title: How to code an animation for refresh icon
body: <p>Issue at hand:</p>
  
  <p>I am currently trying to code an animation function for the refresh icon and so far, through research I have only managed to source this code snippet out:</p>
  
  <pre><code> LayoutInflater inflater= (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      ImageView iv= (ImageView) inflater.inflate(R.layout.spin_refresh, null);
      Animation rotation= AnimationUtils.loadAnimation(DownloadService.this,R.anim.accelerate_decelerate_interpolator);
      rotation.setRepeatCount(Animation.INFINITE);
      iv.startAnimation(rotation);
      refreshItem.setActionView(iv);
      //TODO trigger loading
  </code></pre>
  
  <p>I couldn't actually fully comprehend the codings, are there any simpler way of animation coding or what's the general meaning of the code itself. I have already created a separate animation.xml within the animation folder in res folder.</p>