publicclassMainActivityextendsAppCompatActivity{private RotateAnimation ra;@OverrideprotectedvoidonCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.xuanzhuan);// ra = new RotateAnimation(0,360,100,50);/*ra = new RotateAnimation(0,360,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
ra.setDuration(1000);*/findViewById(R.id.bt_2).setOnClickListener(newView.OnClickListener(){@OverridepublicvoidonClick(View v){
v.startAnimation(AnimationUtils.loadAnimation(MainActivity.this,R.anim.ra));}});}}