Android: ActionBar Item Animation

时间秒杀一切 提交于 2019-12-11 05:24:07

问题


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:


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



来源:https://stackoverflow.com/questions/9898972/android-actionbar-item-animation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!