Expose statusBarStyle on page (#4021)

This commit is contained in:
Alexander Vakrilov
2017-04-21 17:16:57 +03:00
committed by Hristo Hristov
parent 9e3222781a
commit 5457424766
4 changed files with 11 additions and 5 deletions

View File

@@ -35,7 +35,6 @@ export class PageBase extends ContentView implements PageDefinition {
public actionBarHidden: boolean;
public enableSwipeBackNavigation: boolean;
public backgroundSpanUnderStatusBar: boolean;
public statusBarStyle: "light" | "dark";
public androidStatusBarBackground: Color;
constructor() {
@@ -77,6 +76,13 @@ export class PageBase extends ContentView implements PageDefinition {
}
}
get statusBarStyle(): "light" | "dark" {
return this.style.statusBarStyle;
}
set statusBarStyle(value: "light" | "dark") {
this.style.statusBarStyle = value;
}
get page(): PageDefinition {
return this;
}

View File

@@ -5,7 +5,7 @@
*/ /** */
///<reference path="../../tns-core-modules.d.ts" /> Include global typings
import { ContentView, EventData, Property, Color } from "../content-view";
import { ContentView, EventData, Property, Color, CssProperty, Style } from "../content-view";
import { Frame } from "../frame";
import { ActionBar } from "../action-bar";
import { KeyframeAnimationInfo } from "../animation/keyframe-animation";
@@ -286,7 +286,7 @@ export const enableSwipeBackNavigationProperty: Property<Page, boolean>;
/**
* Property backing statusBarStyle.
*/
export const statusBarStyleProperty: Property<Page, "light" | "dark">;
export const statusBarStyleProperty: CssProperty<Style, "light" | "dark">;
/**
* Property backing androidStatusBarBackground.

View File

@@ -131,7 +131,7 @@ export class Style extends Observable {
public selectedBackgroundColor: Color;
// Page-specific props
public statusBarStyle: string;
public statusBarStyle: "light" | "dark";
public androidStatusBarBackground: Color;
constructor(ownerView: ViewBase);

View File

@@ -99,7 +99,7 @@ export class Style extends Observable implements StyleDefinition {
public selectedBackgroundColor: Color;
// Page-specific props
public statusBarStyle: string;
public statusBarStyle: "light" | "dark";
public androidStatusBarBackground: Color;
//flexbox layout properties