Davide Nale Davide Nale - 1 year ago 119
Android Question

Android: error with icons

I just added an item (with an icon) on my toolbar.

problem 1 - when i long press the icon a grey box under it appears

problem 2 - the icon is rendered in black while the theme is set to dark.

Answer Source

For the first problem, this is normal. By default, Android displays the name of the menu when you long press it (accessibility feature). As you should not remove this behavior, you should add a android:name to your menu via XML.

For the second problem, the Toolbar is not tinting automatically the icons you use in your menus. Only the overflow and the navigation icon are tinted by the toolbar. If you are using a Dark theme, you have to use white icon.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download