ActionBar ActionItems : Popup menu icon & color is not setting
See original GitHub issueHi, I am trying to set action-items with popup menu (Like Menu list in Android). Snapshots are as follows :
Image 1
Image 2
Problem :
I want to set custom icons/drawables to action-item’s popup menu, but it’s not setting any icons and default color is black (see three dots in image 1 @ top right corner), i am not able to change color of popup menu’s icon.
I tried foll. code -
<ActionBar title="Compare">
<ActionItem text="Export to PDF" icon="res://menu_white" ios.position="popup" android.position="popup"> </ActionItem>
<ActionItem text="Settings" icon="res://menu_white" ios.position="popup" android.position="popup"> </ActionItem>
</ActionBar>
Is there any way to set custom icon for popup menus? or to set color for popup menu? The default color is black,but as i am having dark gray action bar, i want to set white color for popup menu (three dots). Please help me!
I want to achieve something like this -
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:24 (4 by maintainers)
Top Results From Across the Web
How to set icon color of MenuItem? - android - Stack Overflow
ActionBar " as attribute on your Toolbar in your XML layout. If you want the toolbar popup menu to be light while the...
Read more >Menus - Android Developers
The action mode is disabled and the contextual action bar disappears when the user deselects all items, presses the BACK button, or selects...
Read more >App bars: top - Material Design
When using icons for navigation icons, action items and other elements of top app ... If not, an action bar will be added...
Read more >Using the Android Toolbar (ActionBar) - Tutorial - Vogella.com
If the fill color does not fit to your styling, open the created drawable and adjust the color. 8.2. Add menu resources. Create...
Read more >Action Bar | Android Developers
An action bar that includes the [1] app icon, [2] two action items, ... contextual action bar for displaying contextual action items, see...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I found a way to modify only the color of the icon (three dots). After a lot of research, I found that this “popup” icon is called Overflow Button. Then the solution appeared in stackoverflow. https://stackoverflow.com/questions/35932669/how-do-i-change-the-action-bar-overflow-button-color
first you have to define the color (or you can use one of those that are already defined)
app\App_Resources\Android\src\main\res\values-v21\colors.xml
Now you have to create a style that uses that color and then in the main theme of the app you have to apply that new style to the actionOverflowButtonStyle
app\App_Resources\Android\src\main\res\values-v21\styles.xml
this works perfect for me, I hope it helps.
You cannot style the action popup action items and the overflow button with CSS currently. What you can do is to modify the actual android styles used in your app. The way to do that is to copy the
values
andvalues-v21
folders from your platforms folder (usually under<project>/platforms/android/src/main/res/
toApp_Resources/android
and modify the as you like. The modified styles will be used when you rebuild the app (justlivesync
will not be enough).For example you can change the color of the overflow button by adding the folloing item in you AppTheme(styles.xml):