Icon of the menu item doesn't show up in the Action Bar if it is from app drawable folders

Andrew

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?

Andrew

In situations like that changing icon color or app theme may helps ))

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

menu item won't show in action bar

From Dev

Nemo menu bar doesn't show up

From Dev

"Action Bar" doesn't show up

From Dev

Action buttons doesn't show up on Action Bar?

From Dev

Action buttons doesn't show up on Action Bar?

From Dev

get drawable from Android Menu Item Icon

From Dev

Bootstrap 5.0 Hamburger menu icon doesn't show up

From Dev

Show Menu item always in support action bar

From Dev

Image Icon with Action Bar's Option Menu Item

From Dev

Changing Action Bar Menu Item Icon When Pressed in Android Studio

From Dev

Android action bar won't show up

From Dev

Menu Icon in App Bar

From Dev

How to add "menu" indicator next to Action Bar's app icon?

From Dev

Android action bar doesn't show

From Dev

Action bar doesn't show items

From Dev

Hide/Show Action Bar Option Menu Item for different fragments

From Dev

How to show border around text in android action bar menu item?

From Dev

How to show border around text in android action bar menu item?

From Dev

Android - Action Bar doesn't show up using Theme.AppCompat

From Dev

16.04 doesn't show up in boot menu

From Dev

Navigation bar doesn't show up

From Dev

Admin Bar doesn't show up

From Dev

Android app icon doesn't show on actionbar

From Dev

Android appcompact doesn't show copy action from Contextual Action Bar for text selection

From Dev

Skype icon doesn't show up on app indicator on Ubuntu 16.04 Xenial

From Dev

Menu item moved in action bar

From Dev

Menu item moved in action bar

From Dev

Action Bar - Drag Menu Item

From Dev

QAction doesn't show icon from Pixmap