title: Implement Android scale animation on one View/ImageView when get focus?
body: <p>I want to implement a scale animation to View (or ImageView) when it gets focus. Here is my current implementation:</p>
  
  <pre><code>public class ScaleFocusImageView extends ImageView {
      private Context mContext;
  
      public ScaleFocusImageView(Context context, AttributeSet attr) {
          super(context, attr);
          mContext = context;
      }
  
      @Override
      protected void onFocusChanged (boolean gainFocus, int direction, Rect previouslyFocusedRect) {
          super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
          if(gainFocus) {
              Animation a = AnimationUtils.loadAnimation(mContext, R.anim.scale_up);
              this.startAnimation(a);
          }
  
      }
  }
  </code></pre>
  
  <p>And here is my animation xml 'scale_up.xml':</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;scale
      android:fromXScale="1.0"
      android:toXScale="1.5"
      android:fromYScale="1.0"
      android:toYScale="1.5"
      android:pivotX="50%p"
      android:pivotY="50%p"
      android:duration="175"/&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>I can't get the scale effect when got focus in the end, I just see it scale quickly and shrink to original as normal. Why does this implementation not work how I expect, and how can I fix it?</p>