Files
NativeScript/tns-core-modules/ui/layouts/stack-layout/stack-layout-common.ts
Hristo Hristov 0f14101238 recycling now happens only if nativeView and android properties are not accessed. (#4627)
recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
2017-08-01 15:04:16 +03:00

15 lines
685 B
TypeScript

import { StackLayout as StackLayoutDefinition, Orientation } from ".";
import { LayoutBase, Property, isIOS, makeValidator, makeParser } from "../layout-base";
export * from "../layout-base";
export class StackLayoutBase extends LayoutBase implements StackLayoutDefinition {
public orientation: Orientation;
}
StackLayoutBase.prototype.recycleNativeView = "auto";
const converter = makeParser<Orientation>(makeValidator("horizontal", "vertical"));
export const orientationProperty = new Property<StackLayoutBase, Orientation>({ name: "orientation", defaultValue: "vertical", affectsLayout: isIOS, valueConverter: converter });
orientationProperty.register(StackLayoutBase);