Merge pull request #7881 from NativeScript/mdonev/release-to-master-20190930

chore: merge release to master
This commit is contained in:
Manol Donev
2019-10-01 13:45:11 +03:00
committed by GitHub
7 changed files with 26 additions and 2 deletions

View File

@@ -21,3 +21,7 @@ export function testDisplayedEvent() {
// global.isDisplayedEventFired flag is set in app.ts application.displayedEvent handler
TKUnit.assert((<any>global).isDisplayedEventFired, "application.displayedEvent not fired");
}
export function testOrientation() {
TKUnit.assert(app.orientation, "Orientation not initialized.");
}

View File

@@ -1,7 +1,7 @@
<Page loaded="pageLoaded">
<StackLayout>
<TextField id="textField1" text="{{ varTrue && varFalse }}" />
<TextField id="textField1" text="{{ varTrue &amp;&amp; varFalse }}" />
<TextField id="textField2" text="{{ varTrue || varFalse }}" />
<TextField id="textField3" text="{{ varTrue && varFalse || varText }}" />
<TextField id="textField3" text="{{ varTrue &amp;&amp; varFalse || varText }}" />
</StackLayout>
</Page>

View File

@@ -248,6 +248,10 @@ export function getNativeApplication(): android.app.Application {
return nativeApp;
}
export function orientation(): "portrait" | "landscape" | "unknown" {
return androidApp.orientation;
}
on(orientationChangedEvent, (args: OrientationChangedEventData) => {
const rootView = getRootView();
if (rootView) {

View File

@@ -285,6 +285,12 @@ export function on(event: "discardedError", callback: (args: DiscardedErrorEvent
*/
export function on(event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any);
/**
* Gets the orientation of the application.
* Available values: "portrait", "landscape", "unknown".
*/
export function orientation(): "portrait" | "landscape" | "unknown";
/**
* This is the Android-specific application object instance.
* Encapsulates methods and properties specific to the Android platform.

View File

@@ -415,6 +415,10 @@ function setViewControllerView(view: View): void {
}
}
export function orientation(): "portrait" | "landscape" | "unknown" {
return iosApp.orientation;
}
on(orientationChangedEvent, (args: OrientationChangedEventData) => {
const rootView = getRootView();
if (rootView) {

View File

@@ -27,6 +27,11 @@ export class TabStrip extends View {
*/
iosIconRenderingMode: "automatic" | "alwaysOriginal" | "alwaysTemplate";
/**
* Gets or sets the color that marks the selected tab of the tab strip. Works for Tabs component only.
*/
highlightColor: Color;
/**
* @private
*/

View File

@@ -24,6 +24,7 @@ export class TabStrip extends View implements TabStripDefinition, AddChildFromBu
public items: TabStripItem[];
public isIconSizeFixed: boolean;
public iosIconRenderingMode: "automatic" | "alwaysOriginal" | "alwaysTemplate";
public highlightColor: Color;
public _hasImage: boolean;
public _hasTitle: boolean;