Skip to content

Commit 982c497

Browse files
committed
fix(textfield): android fix crash on lollipop
1 parent 063ef20 commit 982c497

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/textfield/textfield.android.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ export class TextField extends TextFieldBase {
115115
editText.setBackground(null);
116116
// layoutView.setHintEnabled(false);
117117
}
118+
try {
119+
layoutView.setErrorIconDrawable(null);
120+
} catch (error) {}
118121

119-
layoutView.setErrorIconDrawable(null);
120122
// layoutView.setFocusableInTouchMode(true); // to prevent focus on view creation
121123
return layoutView;
122124
}
@@ -130,7 +132,9 @@ export class TextField extends TextFieldBase {
130132
}
131133
[hintProperty.setNative](value: string) {
132134
const text = value === null || value === undefined ? null : value.toString();
133-
this.layoutView.setHint(text);
135+
try {
136+
this.layoutView.setHint(text);
137+
} catch (error) {}
134138
}
135139

136140
[placeholderColorProperty.setNative](value: Color) {

0 commit comments

Comments
 (0)