Bottom tabs navigation

Using the bottom navigation tabs is quite different in code structure to placing tabs in the toolbar of the application. Where the toolbar tabs use TabItem widgets to render their content, the BottomNavigationView uses a menu to decide how it should look. A menu, much like a layout file, is a specialized XML resource file in Android. They also compacted to binary XML during compilation of the project and can be inflated at runtime using a MenuInflator object. Unlike a layout resource, a menu specifies lists of menu items and submenus, and while these have text descriptions and optional icons, they have no other render logic of their own. As a result, they are perfect for representing navigation options to a variety ...

Get Hands-On Android UI Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.