title: Detecting the scrolling direction in the adapter (up/down)
body: <p>I am trying to mimic the Google Plus application in my project, as it seems to be the reference now.</p>
  
  <p>The listview effect when scrolling is really nice and I would like to do something similar.</p>
  
  <p>I have started with the LayoutAnimationController
  <a href="http://android-er.blogspot.be/2009/10/listview-and-listactivity-layout.html" rel="noreferrer">http://android-er.blogspot.be/2009/10/listview-and-listactivity-layout.html</a></p>
  
  <pre><code>LayoutAnimationController controller 
     = AnimationUtils.loadLayoutAnimation(
       this, R.anim.list_layout_controller);
    getListView().setLayoutAnimation(controller);
  </code></pre>
  
  <p>and that seems bad, as not all the elements are animated:</p>
  
  <p>So I ended up by using the getView of the adapter and using this:</p>
  
  <pre><code>        AnimationSet set = new AnimationSet(true);
  
          Animation animation = new AlphaAnimation(0.0f, 1.0f);
          animation.setDuration(800);
          set.addAnimation(animation);
  
          animation = new TranslateAnimation(
              Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
              Animation.RELATIVE_TO_SELF, 1.0f,Animation.RELATIVE_TO_SELF, 0.0f
          );
          animation.setDuration(600);
          set.addAnimation(animation);
  
          row.startAnimation(set);
  </code></pre>
  
  <p>The result is awesome and I am really happy with it!</p>
  
  <p>Unfortunately, it only works when I scroll from top to bottom of the list!</p>
  
  <p>I want to make it work when scrolling on the other side, I need to change a little bit the TranslateAnimation.</p>
  
  <p>So my question, is there a way to detect if I scroll upwards or downwards in my adapter?</p>