There are two ways you can do animation in Android. The first is to set an animation for an ImageView object. That is, you apply basic motions, such as, rotation, shifting, etc to the bitmap inside the ImageView. Below is an example of the method:
private ImageView iv;
iv = new ImageView(context);
iv.setImageResource(resourceIdOfImage);
RotateAnimation anim = new RotateAnimation(0.0f, 360.0f , Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(3000);
iv.setAnimation(anim);
iv.startAnimation(anim);
private ImageView iv;
iv = new ImageView(context);
iv.setImageResource(resourceIdOfImage);
RotateAnimation anim = new RotateAnimation(0.0f, 360.0f , Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(3000);
iv.setAnimation(anim);
iv.startAnimation(anim);