Using a selector for a MenuItem in the ActionBar

后端 未结 3 1756
时光说笑
时光说笑 2020-12-17 05:42

I\'m using ActionBarSherlock. I have a MenuItem, and I want to use a custom selector with only that MenuItem, not the others in the ActionBar. This is the menu code:

3条回答
  •  心在旅途
    2020-12-17 06:02

    first you shall know, if you set android:selectableItemBackground in your holo style, the whole widget, i.e. a button, will have that background selector.

    if you just need to change your actionbar menuitem' s icon selector background, Here is a simple answer!

    just set android:actionBarItemBackground in your holo style!

    
    

    hope it helpful:-)

提交回复
热议问题