0

I am trying to display action overflow menu with icons in my one application. I am not getting icons in menu. My Target SDK is 23 and minimum SDK is 15.

enter image description here

My Menu.XML is like belwo

<?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">
<!-- Single menu item
     Set id, icon and Title for each menu item
-->
<item android:id="@+id/menu_donate"
      android:icon="@drawable/new_facebook_page"
      android:title="@string/facebook"
      app:showAsAction="never" />
<item android:id="@+id/menu_settings"
      android:icon="@drawable/new_facebook_page" 
      android:title="@string/facebook"
      app:showAsAction="never" />
<item android:id="@+id/menu_logout"
      android:icon="@drawable/new_facebook_page"
      android:title="@string/facebook" 
      app:showAsAction="never" />

      </menu>

My Java code is like below.

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu, menu);
        return super.onCreateOptionsMenu(menu);

    }

Thanks

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Rajubhai Rathod
  • 501
  • 2
  • 5
  • 14

1 Answers1

0

the overflow menu doesn't show icons (as CommonsWare said). Anyway you can use this workaround: create an option menu with just one item with the "overflow three dots" icon. When selected, you just show a popupmenu as described here:

How to create a custom PopupMenu in Android

I hope it helped.

Community
  • 1
  • 1