TabBar

TabBar provides a horizontal layout to display tabs.

The TabBar API and Schema will be subject to extensions in future versions.

Examples

Simplified example for a ViewPager which is also locally bound to a TabBar via ID
<TabBar width="fill_parent" boundViewPager="viewpager">
    <Tab text="Imprint" />
    <Tab text="Privacy" />
    <Tab text="Terms" />
    <Tab text="Licenses" />
</TabBar>
<ViewPager id="viewpager" width="fill_parent" height="fill_parent">
    <TextView text="#{imprintText}" />
    <TextView text="#{privacyText}" />
    <TextView text="#{termsText}" />
    <TextView text="#{licenseText}" />
</ViewPager>

Children

The TabBar allows all Views and Layouts as well as Tab elements as children.

TabBar Attributes

Name Type Default Binding Description

Inherits all attributes from View and adds no attributes.

indicatorColor

colorType

platform-default

Color of the selected indicator

indicatorHeight

sizeType

platform-default

Height of the indicator (line)

scrollable

boolean

false

Determines whether the content of the TabBar is scrollable. This is useful if their are many Tabs.

boundViewPager

ID reference

The TabBar can optionally bind to a ViewPager. This is done by referencing the ViewPager’s ID from this attribute as shown in the example.

Tab Attributes

Name Type Default Binding Description

text

string

Text to be displayed in the Tab

icon

URI

Optional icon to be displayed in the Tab


Parts of this documentation are a derivate of the Android Developer Documentation by Google used under CC-BY-2.5.

results matching ""

    No results matching ""