How to display both normal and split ActionBar?

前端 未结 1 1226
一向
一向 2020-12-08 05:38

I have more then a few ActionBar items, and I am using splitActionBarWhenNarrow option. Latest Gmail app also uses it. But it also have a custom item on upper right that sho

相关标签:
1条回答
  • 2020-12-08 05:56

    When the ActionBar is splitted (using android:uiOptions="splitActionBarWhenNarrow"), all menu items automatically go to the bottom bar but custom view can still be put in the top.

    View customNav = LayoutInflater.from(this).inflate(R.layout.custom_view, null);
    getActionBar().setCustomView(customView);
    
    0 讨论(0)
提交回复
热议问题