title: Java Android ImageView-Image rotation only works for the first time
body: <p>I have written a code on in java for image view that will rotate and fade away and another image will be visible, I use <code>imageViewer.animate.rotation(3600).alpha(0);</code> now this works fine when I run the code on an emulator, the images fade and re-appear just fine, but the problem is about the rotation after I compile the app for the first time when I click on the image, it will rotate and fade away and the next picture is shown, but when I tap on the image again, it will not rotate, instead only the fade in and fade out will work but not the rotation (Note that it rotates for the first time after compilation but then doesn't rotates and fade in/out works only). Here is the code:</p>
  <pre><code>public class MainActivity extends AppCompatActivity
  {
      boolean eggview = true;
  
      public void fade(View view)
      {
          ImageView eggImageView = (ImageView) findViewById(R.id.egg);
          ImageView chickImageView = (ImageView) findViewById(R.id.chick);
          if (eggview)
          {
              eggview = false;
              eggImageView.animate().rotation(3600).setDuration(1200).alpha(0);
              chickImageView.animate().alpha(1);
          }
          else
          {
              eggview = true;
              chickImageView.animate().rotation(3600).alpha(0).setDuration(1200);
              eggImageView.animate().alpha(1);
          }
      }
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  }
  </code></pre>