title: android flyin imageView after a certain time
body: <p>The purpose I aming for is, that 2 seconds after my activity was started an ImageView (with an image) should flyIn to the view. But with the following code nothing happens.</p>
  
  <p>Am I on the right way or can I solve this completely different?
  What do I have to change that this works?</p>
  
  <p>Here is how my code looks:</p>
  
  <pre><code>public class Main extends Activity {
      private ImageView _truck;
      private Handler _flyInTruckHandler;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.main);
  
          _truck = (ImageView) findViewById(R.id.main_garbageTruck);
          _truck.setVisibility(View.INVISIBLE);
  
          _flyInTruckHandler = new Handler() {
              public void handleMessage(Message msg) {
                  _truck.setVisibility(View.VISIBLE);
              }
          };
  
          _flyInTruckHandler.postDelayed(new Runnable() {
              public void run() {
                  new flyInTruck();
              }
          }, 2000);
      }
  
      class flyInTruck extends TimerTask {
  
          @Override
          public void run() {
              Animation anim = AnimationUtils.loadAnimation(                      getApplicationContext(), R.anim.flyin);
          findViewById(R.id.main_garbageTruck).setAnimation(anim);
              _flyInTruckHandler.sendEmptyMessage(0);
              anim.start();
          }
      }
  }
  </code></pre>
  
  <p>The animation I use is from here : <a href="https://stackoverflow.com/questions/4991279/fly-in-animation-for-a-gridview">Fly In Animation for a GridView</a>
  But slightly changed:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"
  android:shareInterpolator="true" &gt;
      &lt;scale
          android:duration="2500"
          android:fillAfter="false"
          android:fromXScale="0.0"
          android:fromYScale="0.0"
          android:interpolator="@android:anim/decelerate_interpolator"
          android:pivotX="50%"
          android:pivotY="50%"
          android:toXScale="1.0"
          android:toYScale="1.0" /&gt;
  &lt;/set&gt;
  </code></pre>