Android: ActionBar Item Animation

2019-07-28 11:58发布

I want to apply a rotate Animation to an action in my ActionBar. For the ActionBar I´m using ActionBarSherlock.

My problem is, that in all Solutions I found (e.g. Animated Icon for ActionItem) they are getting the MenuItem which shall be animated in onOptionsItemSelected(MenuItem item).

But I want to be able to start the animation even BEFORE some action is selected. So how can I get the MenuItem?

1条回答
欢心
2楼-- · 2019-07-28 12:10

Call findItem() on the Menu supplied to onCreateOptionsMenu().

查看更多
登录 后发表回答