I am looking for the following: put the icon and next to it the title, as shown in the image where the Google Photos icon is and next to it says Photos .
I have the following code:
<?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/admin"
android:orderInCategory="100"
android:icon="@mipmap/ic_email_white_24dp"
android:title="Enviar Comentario"
app:showAsAction="ifRoom" />
<item
android:id="@+id/acerca"
android:orderInCategory="100"
android:title="Acerca de"
app:showAsAction="never" />
<item
android:id="@+id/salir"
android:orderInCategory="100"
android:title="Salir"
app:showAsAction="never" />
</menu>
this that I have when I open it only shows the text and not the icon plus the text. Any suggestion?
Try to put the menu in the following way:
where your list of items will be a submenu where you force them to always display along with the text with these properties:
showAsAction="always|withText"
Edited:
I have modified the above code and tested it in a test project and it works fine.
I have tested it with the following gradle configuration:
Exiting the menu as follows:
Try using android:showAsAction="ifRoom"