Skip to content

View Pager

Category Requires Version
Layout > Navigation API 21, Android 5.0 Lollipop 3

Overview

A visible component that groups other layout components each of which can be accessed by swiping left or right.

Events

Page Selected

Event to detect that a page was selected.

Params
position Number

Methods

Add Component To View

Add a component to the view pager. The first added component will be the first visible component on the screen.

Params
component Component
tab Name Text

Remove All Tabs

Remove all tab's from view pager.

Remove View At

Removes a before added view from the view pager. If you want to delete the first page then use as position '1'.

Params
position Number

Properties

Get Current Page

Number ➖ Read - Blocks

Get the current selected visible page.

Height

Number ➖ Read Write - Blocks

Specifies the component's vertical height, measured in pixels.

Height Percent

Number ➖ Write - Blocks

Specifies the component's vertical height as a percentageof the height of its parent Component.

Select Page

Number ➖ Write - Blocks

Select a page which is then the active page. Use '1' to select the first page.

Show Tabs

Available as Experimental Property

Boolean Default: True ➖ Read Write - Designer Blocks

If set to true, you will see tabs above the view pager.

Tabs Active Text Color

Color Default: #FF4081FF  ➖ Read Write - Designer Blocks

Specifies the tab's text color for active tab's.

Tabs Background Color

Color Default: #3F51B5FF  ➖ Read Write - Designer Blocks

Specifies the tab's background color.

Tabs Indicator Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Specifies the tab's indicator color.

Tabs Mode

Number Default: 1 ➖ Read Write - Designer Blocks

Choose the mode used for the tab's. If no mode is specified, 'Scrollable' is taken as 'Default'. Use '0' for scrollable and '1' for fixed.

Tabs Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Specifies the tab's text color for not selected tab's.

Visible

Boolean Default: True ➖ Read Write - Designer Blocks

Specifies whether the component should be visible on the screen. Value is true if the component is showing and false if hidden.

Width

Number ➖ Read Write - Blocks

Specifies the component's horizontal width, measured in pixels.

Width Percent

Number ➖ Write - Blocks

Specifies the component's horizontal width as a percentageof the Width of its parent Component.


Last update: November 9, 2022