废话不多,上代码:
final Animation rotateAnimation = new RotateAnimation(0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
final ImageButton buttonDraw = (ImageButton) findViewById(R.id.drawer_button);
buttonDraw.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
rotateAnimation.setDuration(300);
buttonDraw.startAnimation(rotateAnimation);
}
});android view(image,imageButton,...)的旋转
原文:http://blog.csdn.net/qingzhouzhen/article/details/46574077