mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* disable recycling on specific button add more thorough test for view recycling fix memory leak with android ActionBar improve padding reset when view is recycled improve reset of several controls * stopping local animations when view is recycled fix tns-ios version in tests/package.json * Fix isClickable on android when reusing nativeView
19 lines
880 B
TypeScript
19 lines
880 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.nativeView.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
|
|
}
|
|
}
|
|
|
|
TextView.prototype.recycleNativeView = true; |