title: Moving picture ontouch
body: <p>I'm trying to move A picture in android, but I really don't find A way to do it. I used already several methods but none of them really worked, this is my code at the moment</p>
  
  <pre><code>public class Tangram extends Activity implements OnTouchListener{
  ImageView img;
  int x=0,y=0;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
      setContentView(R.layout.tangram);
  
      img = (ImageView) findViewById(R.id.tangrampic1);
      img.setOnTouchListener(this);
      img.scrollBy(x, y);
  }
  
   public boolean onTouch(View v, MotionEvent event) 
      { 
          switch (event.getAction())
          {
              case MotionEvent.ACTION_DOWN:
              {      
                    x++;
                       break; 
              }
              case MotionEvent.ACTION_UP:
              {             
                    x--;  
                   break;
              }
          }
          return true;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Does anybody know how to move an object?</p>