I\'m trying to show a map icon downloaded from the official android developers source.
I did everything as it should, but the icon won\'t show. Here is my xml file n
I dont think an icon is shown in the overflow menu. Try changing your title to "t" or rotate the screen. See if the icon appears this way.
Here is how I fixed it - in case that someone is facing the same issue.
I changed
android:showAsAction="always"
to app:showAsAction="always"
and I also placed the icon order android:orderInCategory="0"
and the auto res xmlns:app="http://schemas.android.com/apk/res-auto"
so now my xml looks like:
<?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:orderInCategory="0"
android:id="@+id/mapIcon"
android:icon="@drawable/ic_action_map"
android:title="@string/mapIconTitle"
app:showAsAction="always"
/>
</menu>