Show Menu item always in support action bar

后端 未结 5 1823
自闭症患者
自闭症患者 2021-01-01 13:04

\"enterI am working on android application . I have implemented supported action bar in it .I

5条回答
  •  借酒劲吻你
    2021-01-01 13:31

    You can use the different values of android:showAsAction property in android menu xml file..

    to show all time visible menu on actionbar, you should go with android:showAsAction="always"..

    You can also use android:showAsAction="ifRoom" but it will show the menu in action bar not always but it will show according to different screen size.

    Edited

    Ref: Menu items doesn't show up on the actionbar

    Try with the below code then..

    
        
            android:title="@string/menu_lang"
            android:icon="@android:drawable/ic_input_lang"/>
    
    

    Hope it will help you..!!!

提交回复
热议问题