android - how to move an image on xml layout when user on touch event? -
i have implemented application image. in application have used on image when ever user touch on image move image along finger touch. have implemented application 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 move image along user finger touch code break; default: break; } return false; } });
from above code not able move image along user finger.
there sample achieve see:
Comments
Post a Comment