In my Activity I created a MenuItem that performs a clockwise animation in ActionBar when some data is loading. When loadData() is called the MenuItem has start the clockwise animation.
This works great, but when I first call loadData() inside onCreate callback the menuItem is not still available since onCreateOptionsMenu() has not been called yet, so my menuItem reference is still null and the animation can't start.
How can I handle this situation?