chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-06 14:25:11 -07:00
parent 94cf5c4706
commit 6336eac4b5
477 changed files with 59087 additions and 74961 deletions

View File

@@ -1,46 +1,33 @@
import {
TextViewBase as TextViewBaseCommon,
maxLinesProperty,
} from "./text-view-common";
import { CSSType } from "../core/view";
import { TextViewBase as TextViewBaseCommon, maxLinesProperty } from './text-view-common';
import { CSSType } from '../core/view';
export * from "../text-base";
export * from '../text-base';
@CSSType("TextView")
@CSSType('TextView')
export class TextView extends TextViewBaseCommon {
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 _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.nativeTextViewProtected.setGravity(
android.view.Gravity.TOP | android.view.Gravity.START
);
}
public resetNativeView(): void {
super.resetNativeView();
this.nativeTextViewProtected.setGravity(android.view.Gravity.TOP | android.view.Gravity.START);
}
[maxLinesProperty.getDefault](): number {
return 0;
}
[maxLinesProperty.getDefault](): number {
return 0;
}
[maxLinesProperty.setNative](value: number) {
if (value <= 0) {
this.nativeTextViewProtected.setMaxLines(Number.MAX_VALUE);
[maxLinesProperty.setNative](value: number) {
if (value <= 0) {
this.nativeTextViewProtected.setMaxLines(Number.MAX_VALUE);
return;
}
return;
}
this.nativeTextViewProtected.setMaxLines(value);
}
this.nativeTextViewProtected.setMaxLines(value);
}
}
TextView.prototype.recycleNativeView = "auto";
TextView.prototype.recycleNativeView = 'auto';