I have implemented an application with image. In my application I have used on image when ever the user touch on image I would like to move the image along with his finger touch. I have implemented my application as follows:
((ImageView)findViewById(R.id.imageView1)).setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_MOVE:
//I would like to Move image along with user finger touch code
break;
default:
break;
}
return false;
}
});
From the above code I am not able to move the image along with user finger.
There is a sample to achieve this see:
http://blahti.wordpress.com/2011/01/17/moving-views-part-2/