title: Android: How to change the position of ImageView dynamically?
body: <p>I want my arrows to continuously move left and right with a delay of certain milliseconds dynamically. Any clue? </p>
  
  <p>Here's my code:</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.os.Handler;
  import android.widget.ImageView;
  
  public class PlayWithGraphics extends Activity {
      /** Called when the activity is first created. */
  
   public final int delay = 2500;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          final ImageView iv = (ImageView)findViewById(R.id.iv);
          iv.setBackgroundResource(R.drawable.back_two);
  
          new Handler().postDelayed(new Runnable(){
              public void run(){ 
  
  
            //iv.setPadding(30, 0, 10, 0);   
              }
          }, delay); 
  
  
  
  
    }
      }
  </code></pre>