TabView for Xamarin.Android: Overview
RadTabView control allows developers to create user interfaces similar to the android tab view (view pager and app bar combo) but is a lot easier to use. On top of that, the tabs of RadTabView can be positioned on all four sides of the parent view (typically of the main view).
Navigation between the different tabs can be done either by tapping on the individual tabs or swiping over the current tab content to display the tab adjacent to it.
The TabView is part of Telerik UI for Xamarin, a
professional grade UI component library for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Tabs alignment
Developers can set the tabs alignment if the tabs are less than max tabs. The alignment can be left, right, center and stretch. By default the tabs are stretched to fill the available tab view area.
Change listeners
Finally developers can listen for tab view events by adding a listener. The listener is notified before and after a tab is selected or deselected. Before a tab is selected or deselected the callback allows the developer to cancel the selection/deselection. A tab can either be selected with a tap gesture or through code by setting the selectedTab property.
The listener is also notified when the tab view needs the content view of a tab. This happens only if a tab without a content view is added initially. This lazy loading of the content view helps when the tab view contains content that loads slowly because of network requests or some other time-consuming operation.