
Īn added benefit of this markup declaration is that it’s now the same across frameworks. Here is an example of the new markup with the BottomNavigation component. Can contain any layout component or a new tab component.
#Tabview with different action bars nativescript for android
One of the problems of the TabView component was that it tried to combine these two sets of behaviours in a weird way - for Android it effectively had the Tabs behaviour, while for iOS it did the BottomNavigation one. Use the Tabs component when you want to create sort of a pager to browse between items that have the same context. Use the BottomNavigation for high level navigation where the separate tabs don’t have shared context. Here is a table that displays the behavioural differences between the two:Īs you can see, these are two different components with different behaviour and both have their use cases. As I mentioned, we took heavy inspiration from Material Design, so you can check the respective articles about BottomNavigation and Tabs usage for some explanation and examples in terms of design.

The BottomNavigation and Tabs components are separated by function. The New Components in Townįirstly, I must explain why we decided to go for two separate components.

Tip: Be sure to check out the custom tab bar at the end for maximum coolness overload.

These two new ones are so much better you should forget about the TabView entirely. We also took inspiration from Material Design to separate the components by function and thus, we have two components in place of the TabView: BottomNavigation and Tabs. Ultimately, we decided on a complete redesign that included a new approach to markup, styling, and customization. Picking these one-by-one didn’t work out very well and we took a more holistic approach to figure out what was wrong. The issues ranged from bugs and difficulties in use to unsupported scenarios and limitations. Given the component’s importance to the overall app navigation we wanted to fix this. Some time ago we identified the TabView as one of our most problematic components in terms of reported issues. Now, with version 6.1 they are finally out of beta. They are dubbed BottomNavigation and Tabs and are meant to be new and better alternatives to the existing TabView component. In NativeScript 6 we introduced two new tab navigation components to the core modules suite.
