I am animating an action button:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
ImageView iv = (ImageView)inflater.inflate(R.layout.iv_main_menu_icon, null);
Animation rotation = AnimationUtils.loadAnimation(this, R.anim.rotate);
rotation.setRepeatCount(Animation.INFINITE);
iv.startAnimation(rotation);
menu.findItem(R.id.action_goto_menu).setActionView(iv);
return super.onCreateOptionsMenu(menu);
}
But the problem is, after applying this animation the click event isn't firing from this. What am I missing?