Files
NativeScript/tns-core-modules/ui/text-view/text-view.android.ts
Hristo Hristov 09535627b9 disable recycling on specific button (#4527)
* 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
2017-07-11 09:48:08 +03:00

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;