title: Quick Return Pattern for FAB and ListView
body: <p>I have a simple ListView inside a ViewPager and a Floating Action Bar at the bottom right corner of the screen.</p>
  
  <p>I want to implement the Quick Return pattern to it so that when I scroll the ListView the FAB goes down the screen and comes up on opposite scroll.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT:</p>
  
  <pre><code>list.setAdapter(new QuickReturnAdapter(adapter));
              quickReturnAttacher = QuickReturnAttacher.forView(list);
              quickReturnAttacher.addTargetView(floatMenu, AbsListViewScrollTarget.POSITION_BOTTOM, dpToPx(context, 400));
  
              if (quickReturnAttacher instanceof AbsListViewQuickReturnAttacher) {
                  // This is the correct way to register an OnScrollListener.
                  // You have to add it on the QuickReturnAttacher, instead
                  // of on the viewGroup directly.
                  final AbsListViewQuickReturnAttacher attacher = (AbsListViewQuickReturnAttacher) quickReturnAttacher;
                  attacher.addOnScrollListener(new AbsListView.OnScrollListener() {
                      @Override
                      public void onScrollStateChanged(AbsListView view, int scrollState) {
  
                      }
  
                      @Override
                      public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
  
                      }
                  });
              }
  </code></pre>
  
  <p>Then I am using quickReturnAttacher.setOnItemClickListener and this ain't working.</p>