title: set animation on listview scrolling in android
body: <p>I want to set an animation for a <code>ListView</code> for when a user scrolls the <code>ListView</code>. I am setting an animation for <code>ListView</code> when loading, but I want to set an animation for scrolling. </p>
  
  <p>This is my animation file in eclipse :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;translate xmlns:android="schemas.android.com/apk/res/android";   
      android:duration="900" android:fromXDelta="-100%p" 
      android:interpolator="@android:anim/linear_interpolator" 
      android:repeatCount="0" android:repeatMode="reverse" 
      android:fillEnabled="true" android:fillAfter="true" android:toXDelta="0%p" &gt;
  &lt;/translate&gt;
  </code></pre>
  
  <p>this code is set items to my listview : </p>
  
  <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) {
      ViewHolder holder;
      StructNote item = getItem(position);
      if (convertView == null) {
          convertView = G.inflater.inflate(R.layout.adapter_notes, parent, false);
          holder = new ViewHolder(convertView);
          convertView.setTag(holder);
      } else {
          holder = (ViewHolder) convertView.getTag();
      }
      holder.fill(this, item, position); return convertView;
  }
  </code></pre>
  
  <p>and this is a ActivityMain that set animation to listview </p>
  
  <pre><code>ListView lstContent = (ListView) findViewById(R.id.lstContent);
  Animation animation = AnimationUtils.loadAnimation(this, R.anim.translate);    
  lstContent.setLayoutAnimation(new LayoutAnimationController(animation));
  </code></pre>
  
  <p>Any one can help me??</p>