Files
NativeScript/tns-core-modules/ui/layouts/stack-layout/stack-layout.android.ts
Hristo Hristov 1d49f5f3c3 fix padding on text-view & text-field (#3758)
* fix padding on text-view & text-field
text-base is now snapshotable
view.android is now snapshotable

* createNativeView returns the nativeView for android
Fix image tests
Implement test for image loaded from res://
EffectivePaddings updated when nativeView have some from its native theme
2017-03-09 16:09:53 +02:00

27 lines
922 B
TypeScript

import { StackLayoutBase, orientationProperty } from "./stack-layout-common";
export * from "./stack-layout-common";
export class StackLayout extends StackLayoutBase {
private _layout: org.nativescript.widgets.StackLayout;
get android(): org.nativescript.widgets.StackLayout {
return this._layout;
}
get _nativeView(): org.nativescript.widgets.StackLayout {
return this._layout;
}
public _createNativeView() {
const layout = this._layout = new org.nativescript.widgets.StackLayout(this._context);
return layout;
}
get [orientationProperty.native](): "horizontal" | "vertical" {
return "vertical";
}
set [orientationProperty.native](value: "horizontal" | "vertical") {
this._layout.setOrientation(value === "vertical" ? org.nativescript.widgets.Orientation.vertical : org.nativescript.widgets.Orientation.horizontal)
}
}