title: Using Animation in Adapter with ViewHolder Pattern
body: <p>I have a problem when using an Animation in my Adapter.</p>
  
  <pre><code>@Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
          if (convertView == null) {
              LayoutInflater inflater = LayoutInflater.from(context);
              convertView = inflater.inflate(resource, parent, false);
              holder = new ViewHolder();
  
              holder.newRoomView = (TextView) convertView.findViewById(R.id.newRoom);
              convertView.setTag(holder);
          } else {
              holder = (ViewHolder) convertView.getTag();
          }
  
          Room item = items.get(position);
  
          // animate new rooms
          if (item.isNewRoom()) {
              AlphaAnimation alphaAnim = new AlphaAnimation(1.0f, 0.0f);
              alphaAnim.setDuration(1500);
              alphaAnim.setAnimationListener(new AnimationListener() {
                  public void onAnimationEnd(Animation animation) {
                      holder.newRoomView.setVisibility(View.INVISIBLE);
                  }
  
                  @Override
                  public void onAnimationStart(Animation animation) {}
  
                  @Override
                  public void onAnimationRepeat(Animation animation) {}
              });
              holder.newRoomView.startAnimation(alphaAnim);
          }
  
          // ...
  
          return convertView;
      }
  </code></pre>
  
  <p>When adding a new room outside of the adapter and calling <code>notifyDataSetChanged</code> the new room is correctly animated, but when <code>onAnimationEnd</code> is called, another (not new room) is hidden.</p>
  
  <p>Is there any way to get the correct room hidden?</p>