Files
NativeScript/tns-core-modules/ui/text-view/text-view.android.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

19 lines
891 B
TypeScript

import { TextView as TextViewDefinition } from ".";
import { EditableTextBase } from "../editable-text-base";
export * from "../text-base";
export class TextView extends EditableTextBase implements TextViewDefinition {
public _configureEditText(editText: android.widget.EditText) {
editText.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_NORMAL | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE | android.text.InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
editText.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
}
public resetNativeView(): void {
super.resetNativeView();
this.nativeViewProtected.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
}
}
TextView.prototype.recycleNativeView = "auto";