Issue at hand:
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:
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
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.
I guess you need to rotate the image to self like second animation in this post
You can use this:
Hope this helps.