Files
NativeScript/tns-core-modules/ui/layouts/wrap-layout/wrap-layout.android.ts
Hristo Hristov c18a76c93a rename:
_createNativeView to createNativeView;
_initNativeView to initNativeView
_disposeNativeView to disposeNativeView
_resetNativeView to resetNativeView
2017-03-28 18:08:59 +03:00

23 lines
880 B
TypeScript

import { WrapLayoutBase, orientationProperty, itemWidthProperty, itemHeightProperty, Length } from "./wrap-layout-common";
export * from "./wrap-layout-common";
export class WrapLayout extends WrapLayoutBase {
nativeView: org.nativescript.widgets.WrapLayout;
public createNativeView() {
return new org.nativescript.widgets.WrapLayout(this._context);
}
[orientationProperty.setNative](value: "horizontal" | "vertical") {
this.nativeView.setOrientation(value === "vertical" ? org.nativescript.widgets.Orientation.vertical : org.nativescript.widgets.Orientation.horizontal)
}
[itemWidthProperty.setNative](value: Length) {
this.nativeView.setItemWidth(Length.toDevicePixels(value, -1));
}
[itemHeightProperty.setNative](value: Length) {
this.nativeView.setItemHeight(Length.toDevicePixels(value, -1));
}
}