We're running into a really painful issue with Honeycomb's ActionBar
here, and I was wondering if anyone else has found a solution. The problem itself is quite simple:
We frequently trigger background tasks in Activity onCreate
or onResume
, since most of our screens must display data loaded from a Web service. While these tasks are running, we show the ActionBar's refresh spinner and animate it. The problem is: onCreate and onResume are executed before onCreateOptionsMenu
is, so at the point where we start the task, the refresh spinner doesn't even exist. Hence, it won't animate.
I don't see any simple way around this. I guess we could keep the information about a task being spawned in onCreate, and as soon as the ActionBar becomes available, update it accordingly. But still, I can't believe a use case as common as this is so difficult to do with ActionBar?