last day (15 days later) » 

5:02 PM
0
Q: Set Color of action bar menu

iqueqiorioHow can I programmaticly set the color of the action bar menu. I am talking about the three vertical dots that appear on the top right of the action bar. How can I set the color of this programatically. Here is what I have tried How do I change the background color of the ActionBar of an Acti...

 
see above, but I can't find programatic answer
@stkent is there an easy way to set it to white? Like holo.dark.white I can't seem where to set that action bar theme
 
@Joseph82 where is main theme definition?
 
You said that you was talking about the three vrtical dots (aka action overflow). Ok, maybe you was talking about the manu that appears when you click on the action overflow
 
@Joseph82 yes the action overflow, I want those three dots white?
 
5:02 PM
ok, so you can use that link: look at ic_action_overflow and use your own icon (white)
 
okay but where does that block of xml go?
 
have you already defined a theme for your app or activity?
 
ok, in this case you can simply copy the xml shown in that link
<!-- Base application theme. -->
<style name="Your.Theme" parent="@android:style/Theme.Holo">
<!-- Pointer to Overflow style ***MUST*** go here or it will not work -->
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
</style>

<!-- Styles -->
<style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">@drawable/ic_action_overflow</item>
</style>
 
and paste it into my activity
 
5:05 PM
inside theme.xml file
 
no
 
ya xml of the activity is what i meant
 
no
another xml
for example in an xml named styles.xml
ora theme.xml
 
5:07 PM
in general a theme is a collection of style
after that, if you want add that style only to your activity
go in the Manifest
and set :

android:theme="@style/YourThemeName"
I wrote @style, since I'm supposing that your xml file is named style.xml
while, If you want apply that theme to the entaire application
go in the Mainfest...in the application tag
 
kk thanks
 
and put that attribute

<application android:theme="@style/YourThemeName"
ok?
:)
 
yep got it :)
 
ok :)
 

last day (15 days later) »