When I do like this it works:
<item
android:id="@+id/menu_show_location"
android:title="@string/menu_show_location"
android:icon="@android:drawable/ic_dialog_map"
app:showAsAction="always"/>
But if I take icon from app drawable:
<item
android:id="@+id/menu_show_location"
android:title="@string/menu_show_location"
android:icon="@drawable/ic_action_place"
app:showAsAction="ifRoom"/>
the menu item doesn't show up nor in the menu nor in the action bar either.
Full xml:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never" />
<item
android:id="@+id/menu_show_location"
android:title="@string/menu_show_location"
android:icon="@android:drawable/ic_dialog_map"
app:showAsAction="always"/>
<!--android:icon="@drawable/ic_action_place"-->
</menu>
What can be a problem?
In situations like that changing icon color or app theme may helps ))
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments