Skip to content

Commit acf3ad7

Browse files
author
farfromrefug
committed
fix(textfield,textview): android fix for editable property
1 parent 8f39bec commit acf3ad7

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

src/textfield/textfield.android.ts

+10-13
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ export class TextField extends TextFieldBase {
6565
const variant = this.variant;
6666
let needsTransparent = false;
6767
if (variant === 'filled') {
68-
6968
layoutIdString = 'ns_material_text_field_filled';
7069
} else if (variant === 'outline') {
71-
7270
layoutIdString = 'ns_material_text_field_outline';
7371
} else {
7472
needsTransparent = true;
@@ -328,18 +326,17 @@ export class TextField extends TextFieldBase {
328326
this.nativeTextViewProtected.setGravity(getHorizontalGravity(this.textAlignment) | getVerticalGravity(value));
329327
}
330328

331-
[editableProperty.setNative](value: boolean) {
332-
super[editableProperty.setNative](value);
333-
const nativeView = this.nativeTextViewProtected;
334-
nativeView.setFocusable(value);
335-
}
329+
// [editableProperty.setNative](value: boolean) {
330+
// super[editableProperty.setNative](value);
331+
// // const nativeView = this.nativeTextViewProtected;
332+
// // nativeView.setFocusable(value);
333+
// }
336334

337335
[testIDProperty.setNative](value: string): void {
338-
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
339-
}
336+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
337+
}
340338

341-
[accessibilityIdentifierProperty.setNative](value: string): void {
342-
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
343-
}
339+
[accessibilityIdentifierProperty.setNative](value: string): void {
340+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
341+
}
344342
}
345-

src/textview/textview.android.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@ export class TextView extends TextViewBase {
6262
const variant = this.variant;
6363
let needsTransparent = false;
6464
if (variant === 'filled') {
65-
6665
layoutIdString = 'ns_material_text_view_filled';
6766
} else if (variant === 'outline') {
68-
6967
layoutIdString = 'ns_material_text_view_outline';
7068
} else {
7169
needsTransparent = true;
@@ -306,11 +304,10 @@ export class TextView extends TextViewBase {
306304
this.nativeTextViewProtected.setGravity(getHorizontalGravity(this.textAlignment) | getVerticalGravity(value));
307305
}
308306
[testIDProperty.setNative](value: string): void {
309-
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
310-
}
307+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
308+
}
311309

312-
[accessibilityIdentifierProperty.setNative](value: string): void {
313-
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
314-
}
310+
[accessibilityIdentifierProperty.setNative](value: string): void {
311+
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
312+
}
315313
}
316-

0 commit comments

Comments
 (0)