mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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.
21 lines
564 B
TypeScript
21 lines
564 B
TypeScript
import { Layout as LayoutDefinition } from "./layout";
|
|
import { LayoutBase } from "./layout-base";
|
|
|
|
export * from "./layout-base";
|
|
export class Layout extends LayoutBase implements LayoutDefinition {
|
|
nativeViewProtected: UIView;
|
|
|
|
constructor() {
|
|
super();
|
|
this.nativeViewProtected = UIView.new();
|
|
}
|
|
|
|
get ios(): UIView {
|
|
return this.nativeViewProtected;
|
|
}
|
|
|
|
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void {
|
|
// Don't call super because it will measure the native element.
|
|
}
|
|
}
|