Files
NativeScript/nativescript-core/ui/layouts/stack-layout/index.android.ts
Nathan Walker da3c0b973d chore: format
2020-07-11 11:01:40 -07:00

20 lines
582 B
TypeScript

import { StackLayoutBase, orientationProperty } from "./stack-layout-common";
export * from "./stack-layout-common";
export class StackLayout extends StackLayoutBase {
nativeViewProtected: org.nativescript.widgets.StackLayout;
public createNativeView() {
return new org.nativescript.widgets.StackLayout(this._context);
}
[orientationProperty.setNative](value: "horizontal" | "vertical") {
this.nativeViewProtected.setOrientation(
value === "vertical"
? org.nativescript.widgets.Orientation.vertical
: org.nativescript.widgets.Orientation.horizontal
);
}
}