title: Android make a runnable run only once
body: <p>Hi i have an animation that i'm wanting to delay the start of with a runnable however its cause the animation to loop which i don't need i just want it to delay and then run once does anyone know how?</p>
  
  <p>heres my code</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.layout_initialsetup);
          handler = new Handler();
          final Runnable r = new Runnable()
          {
              public void run() 
              {
                  animations();
                  handler.postDelayed(this, 1000);
              }
          };
          handler.postDelayed(r, 1000);
      }
  
  
      public void animations(){
          image = (ImageView)findViewById(R.id.su_shirts);
          AnimationMovepos = AnimationUtils.loadAnimation(this, R.anim.shirt_anim);   
          image.startAnimation(AnimationMovepos); 
      }
  }
  </code></pre>