mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
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.
This commit is contained in:
@ -12,8 +12,8 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
|
||||
public resetNativeView(): void {
|
||||
super.resetNativeView();
|
||||
this.nativeView.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
|
||||
this.nativeViewProtected.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
|
||||
}
|
||||
}
|
||||
|
||||
TextView.prototype.recycleNativeView = true;
|
||||
TextView.prototype.recycleNativeView = "auto";
|
Reference in New Issue
Block a user