PAGE_INDICATOR
Start from API_LEVEL
2.1. Please refer to API_LEVEL。
Page indicator that indicates the current page position.
Create UI widget
import { createWidget, widget } from '@zos/ui'
const scrollBar = createWidget(widget.PAGE_INDICATOR, Param)
Param: object
| Properties | Description | Required | Type |
|---|---|---|---|
| x | Widget x-coordinate | YES | number |
| y | Widget y-coordinate | YES | number |
| w | Widget Width | YES | number |
| h | Widget Height | YES | number |
| align_h | Horizontal alignment | NO | number |
| h_space | Horizontal spacing | NO | number |
| select_src | Indicator current highlighted icon path | YES | string |
| unselect_src | Indicator not selected icon path | YES | string |
Code example
import { createWidget, widget, align } from '@zos/ui'
const pageIndicator = createWidget(widget.PAGE_INDICATOR, {
x: 0,
y: 470,
w: 480,
h: 100,
align_h: align.CENTER_H,
h_space: 8,
select_src: 'images/test/select/select.png',
unselect_src: 'images/test/select/unselect.png'
})