title: I am trying to rotate imagebutton to 360 by clicking it but it can't rotate it?
body: <p>I am trying to rotate an imagebutton to 360 by clicking itself but it doesn't work</p>
  
  <p>I am using xml file like this..</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;ImageView
          android:id="@+id/imageView1"
          android:layout_width="72dp"
          android:layout_height="72dp"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="83dp"
          android:layout_marginTop="103dp"
          android:clickable="true"
          android:src="@drawable/cute" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and java code like this...</p>
  
  <pre><code>package com.example.testapplication;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.animation.RotateAnimation;
  import android.widget.ImageButton;
  
  public class MainActivity extends Activity implements OnClickListener {
  
  
      ImageButton img;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          img = (ImageButton) findViewById(R.id.imageView1);
  
  
  
      }
      public void onClick(View v) {
          // TODO Auto-generated method stub
          RotateAnimation ra =new RotateAnimation(0, 360);
          ra.setFillAfter(true);
          ra.setDuration(0);
  
          img.startAnimation(ra);
  
      }
  
  }
  </code></pre>
  
  <hr>
  
  <p>my aim of application is using 9 img btn develop and puzzle find game.... </p>