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:

http://blahti.wordpress.com/2011/01/17/moving-views-part-2/


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -