Class “Page”

Object > NativeObject > Widget > Composite > Page

A container representing a single page of a NavigationView widget.

Page on Android
Android
Page on iOS
iOS
Constructor public
Singleton No
Namespace tabris
Direct subclasses None
JSX support Element: <Page/>
Parent element: <NavigationView/>
Child elements: Widgets
Text content: Not supported

Example

import {NavigationView, Page, contentView} from 'tabris';

new NavigationView({layoutData: 'stretch'})
  .append(new Page({title: 'Albums'}))
  .appendTo(contentView);

See also:

JSX Creating a stack of pages

Constructor

new Page(properties?)

Parameter Type Optional Description
properties Properties<Page> Yes Sets all key-value pairs in the properties object as widget properties.

Methods

insertBefore(widget)

Inserts this widget directly before the given Page.

Parameter Type Optional Description
widget Page No  

Returns this

Properties

autoDispose

Defines whether this page will be automatically disposed when popped from the NavigationView, e.g. using native back navigation.

Type boolean
Default true
Settable Yes
Change events Yes

image

An image to be displayed in the navigation bar

Type ImageValue
Settable Yes
Change events Yes

title

The page title to be displayed in the navigation bar.

Type string
Settable Yes
Change events Yes

Events

appear

Fired when the page is about to become visible, i.e. it has become the active page.

disappear

Fired when the page is no longer visible, i.e. another page has become the active page.

Change Events

imageChanged

Fired when the image property has changed.

Parameter Type Description
value ImageValue The new value of image.

titleChanged

Fired when the title property has changed.

Parameter Type Description
value string The new value of title.

autoDisposeChanged

Fired when the autoDispose property has changed.

Parameter Type Description
value boolean The new value of autoDispose.