title: How To Call this Animation in onCreate() in Android?
body: <p>I am following this <a href="https://medium.com/@ayushpguptaapg/how-to-add-shine-glare-effect-on-an-imageview-ab3e9e660307" rel="nofollow noreferrer">link</a> for my animation Requirement. 
  <strong><a href="https://medium.com/@ayushpguptaapg/how-to-add-shine-glare-effect-on-an-imageview-ab3e9e660307" rel="nofollow noreferrer">https://medium.com/@ayushpguptaapg/how-to-add-shine-glare-effect-on-an-imageview-ab3e9e660307</a></strong></p>
  
  <p>This has done on button click listener. Which is working fine. But i want to do it without button click as this animation starts as the activity load. 
  I have searched alot, but didn't find any simple solution.
  Can anybody tell me the simple solution.
  Thanks in advance.</p>
  
  <hr>
  
  <p>@ismail, i am using your this code, like this:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity{
  
      Button shinebtn;
      ImageView img,shine;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
            img = findViewById(R.id.img);
          shine = findViewById(R.id.shine);
           shinebtn=findViewById(R.id.button);
  
  
          doAnimation();
  
  
  }
      public void doAnimation(){
          new Thread(new Runnable() {
              public void run() {
                  final Animation animation = new TranslateAnimation(0, img.getWidth()+shine.getWidth(),0, 0);
                  animation.setDuration(1000);
                  animation.setFillAfter(false);
                  animation.setRepeatCount(Animation.INFINITE);
                  animation.setInterpolator(new AccelerateDecelerateInterpolator());
                  shine.post(new Runnable() {
                      public void run() {
                          shine.startAnimation(animation);
                      }
                  });
              }
          }).start();
  
  
      }
  
  
  }
  </code></pre>