self-rotage animation
RotateAnimation anim = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
//Setup anim with desired properties
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE); //Repeat animation indefinitely
anim.setDuration(300); //Put desired duration per anim cycle here, in milliseconds
login_button = (ImageButton) view.findViewById(R.id.login_button);
login_button.setAnimation(anim);