Here's an animation I'm using in my project, but it gets animated as soon as it's clicked:
Button refresh = (Button)findViewById(R.id.refresh);
refresh.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
arg0.startAnimation(rotate);
webView.loadUrl(urlOriginal);
}
});
I would like to put the animation as soon as it appears on the screen, ie without having to be clicked on for the animation to start.