title: 2 separate onclick functions
body: <p>I have been trying to make the second image animate, but it doesn't work. I created a class for the type of animation I will like to use and then called on the image onclick function to run the animation. Can you please take a look at my code and help me out</p>
  
  <pre><code>    class img{
  
      ImageView img1 = (ImageView)findViewById(R.id.img1);
      ImageView img2 = (ImageView)findViewById(R.id.img2);
  
      void fadeIn(){
  
          img1.animate().alpha(0f).setDuration(2000);
          img2.animate().alpha(1f).setDuration(2000);
      }
      void slideOutLeft(){
          img1.animate().translationXBy(-2000f).setDuration(2000);
      }
      void slideOutDown(){
          img1.animate().translationYBy(1000f).setDuration(2000);
      }
  
  }
  public void made(View view){
      img Stop = new img();
      Stop.slideOutDown();
  }
  
  public void fade(View view){
      img Start = new img();
  
      Start.slideOutLeft();
  
  }
  </code></pre>