how to move image using android
I am working on a project in android.In this project i have to move an image from one place to other.i did it using translateanimation.But it is not moving smoothly.Can anyone suggest usi开发者_如何学JAVAng opengl?
You can move an image smoothly with translateanimation by using setDuration().
try this code
TranslateAnimation anim = new TranslateAnimation(xFrom,xTo,yFrom,yTo);
anim.setDuration(2000);
image.setAnimation(anim);
if your intantion is to move the image as per touch then there is no need to use opengl
plse refer this question which is shown how to move the image using touch click here
精彩评论