softydamesnow softydamesnow - 10 months ago 47
Android Question

How to achieve the same appbar-design as Periscope's Android app?

Here is a screenshot of the toolbar. It has three navigation items to the left which looks just like a tab-layout. When you select the third tab, a menu item pops up from right side of the toolbar.


How can i achieve this look? Is this a tablayout inside a toolbar? Or a tablayout and a toolbar next to each other? I've tried some stuff but failed.


I would use TabBarView. Then, in the Fragment you want a MenuItem to show (like the last tab in Periscope), add setHasOptionsMenu(true) and have the MenuItem's visibility be app:showAsAction="always". Wally also uses this UI pattern.