androidmenuandroid-actionbaractivity

how to convert the old Menu or Setting button so Android apps to the new or most common button in Barr Menu?


Who can leave a link in the video comment window explaining how to convert the old Menu or Setting button so Android apps to the new or most common button in Barr Menu. It is as in the picture below. Thank you in advance for your help.

click here to see more detail one picture


Solution

  • Design a menu XML as below:

    <?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"
        xmlns:tools="http://schemas.android.com/tools">
    
        <item
            android:id="@+id/action_star"
            android:title="Star"
            app:showAsAction="always">
        </item>
    
        <item
            android:id="@+id/action_save"
            android:title="Save"
            app:showAsAction="never">
        </item>
    
        <item
            android:id="@+id/action_color"
            android:title="Color"
            app:showAsAction="never">
        </item>
    
        <item
            android:id="@+id/action_about"
            android:title="About"
            app:showAsAction="never">
        </item>
    
        <item
            android:id="@+id/action_share"
            android:title="Share"
            app:showAsAction="never">
        </item>
    
        <item
            android:id="@+id/action_clear"
            android:title="Clear"
            app:showAsAction="never">
        </item>
    </menu>
    

    OUTPUT:

    enter image description here