Optional
layout?: IFlexLayout<any>Gets/sets layout to header bar. It's mainly used to customize header bar content and recommended to not use with left/right item, titlelayout and title.
5.0.4
Defines the opacity of a view. The value of this property is a float number between 0.0 and 1.0. For iOS, you should access this property from page.parentController. 0 represents view is completely transparent and 1 represents view is completely opaque.
= 1]
4.0.0
Gets/sets transparency of header bar. For iOS, you should access this property from page.parentController.
= true]
4.0.0
Gets/sets border visibility of headerbar. For iOS, you should access this property from page.parentController.
= true]
3.0.3
Gets/sets background color of the header bar. If not set, header bar will have default background color depending on device's OS and OS version. For iOS, you should access this property from page.parentController.
import Page from '@smartface/native/ui/page';
import Color from '@smartface/native/ui/color';
var myPage = new Page({
onLoad: function() {
var page = this;
var headerBar = System.OS === "Android" ? page.headerBar : page.parentController.headerBar;
headerBar.backgroundColor = Color.RED;
}
});
= Color.create("#00A1F1")]
0.1
Gets/sets item color of the header bar. This property will change color of the left item and color of all header bar items. For iOS, you should access this property from page.parentController.
import Page from '@smartface/native/ui/page';
import Color from '@smartface/native/ui/color';
var myPage = new Page({
onLoad: function() {
var page = this;
var headerBar = System.OS === "Android" ? page.headerBar : page.parentController.headerBar;
headerBar.itemColor = Color.BLUE;
}
});
= Color.WHITE]
0.1
Gets/sets background image of the HeaderBar. For iOS, you should access this property from page.parentController.
import Page from '@smartface/native/ui/page';
import Image from '@smartface/native/ui/image';
var myPage = new Page({
onLoad: function() {
var page = this;
var headerBar = System.OS === "Android" ? page.headerBar : page.parentController.headerBar;
headerBar.backgroundImage = Image.createFromFile('images://smartface.png');
}
});
= null]
0.1
Gets/sets the navigation indicator visibility of the headerBar. If false navigation indicator will not show, otherwise will show as back icon if left item not set.
= false]
0.1
Readonly
height: numberGets the height of the header bar. Height is a read only property and its value may change depending on device and screen density. For iOS, you should access this property from page.parentController.
0.1
Optional
titleGets/sets the title layout of the HeaderBar. Title layout allows you to assign custom view. For iOS, layouts are centered on the header bar and may be resized to fit.
3.2.1
Gets/sets title of the header bar.
0.1
Gets/sets title color of the header bar. For iOS, you should access this property from page.parentController.
= Color.BLACK]
0.1
Gets/sets visibility of the header bar. For iOS, you should access this property from page.parentController.
= true]
0.1
This function allows you to set header bar items to the right of page's headerBar. Given items should be instance of UI.HeaderBarItem class. Items will be added to header bar in given array order starting from right of header bar.
setItems
0.1
Array of HeaderBarItem objects to add
Sets left item of header bar to given item.
import Page from '@smartface/native/ui/page';
import HeaderBarItem from '@smartface/native/ui/headerbaritem';
var myPage = new Page();
myPage.onLoad = function(e){
var leftItem = new HeaderBarItem();
leftItem.title = "Left Item";
myPage.headerBar.setLeftItem(leftItem);
}
setLeftItem
HeaderBarItem to add.
Generated using TypeDoc
Example