http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

>>
The individual action items inherit the default blue background when
selected. We can customise this behaviour by overriding
android:selectableItemBackground<http://developer.android.com/reference/android/R.styleable.html#Theme_selectableItemBackground>
and
setting a shape drawable with our desired colouring
<<

-- K

7 февраля 2012 г. 14:27 пользователь Ab <[email protected]> написал:

> I would like to programmatically set the background of an ActionBar
> item to draw as a specific color.
>
> For a View I would accomplish this by setting the background of the
> View to a custom selector, which uses my specific color for the
> "selected" state; then I would call View.setSelected(boolean) to
> toggle the specific color on and off.
>
> Is there a way to accomplish the same effect for items in the
> ActionBar?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to