How to show item icons on Android toolbar
1 answer
you need to add this to your xml menu
xmlns:app="http://schemas.android.com/apk/res-auto"
then it android:showAsAction="always"
should look like this:
app:showAsAction="always"
the final conclusion will be something like this
<?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/bno_bookmark"
android:visible="true"
android:title="@string/disable_draw"
android:icon="@drawable/ic_pen"
app:showAsAction="always">
</item>
</menu>
+12
source to share