Skip to content

Commit d1ea1f4

Browse files
committed
fix(textview): android stroke color fixes
1 parent 74726a8 commit d1ea1f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/textview/textview.android.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ export class TextView extends TextViewBase {
208208
const color = value instanceof Color ? value.android : value;
209209
if (this.layoutView.setBoxStrokeColorStateList) {
210210
const activeColor = this.strokeColor instanceof Color ? this.strokeColor.android : this.layoutView.getBoxStrokeColor();
211-
const colorStateList = getFullColorStateList(activeColor, color);
211+
const disabledColor = this.strokeDisabledColor instanceof Color ? this.strokeDisabledColor.android : undefined;
212+
const colorStateList = getFullColorStateList(activeColor, color, disabledColor);
212213
this.layoutView.setBoxStrokeColorStateList(colorStateList);
213214
}
214215
}
@@ -217,7 +218,8 @@ export class TextView extends TextViewBase {
217218
const color = value instanceof Color ? value.android : value;
218219
if (this.layoutView.setBoxStrokeColorStateList) {
219220
const activeColor = this.strokeColor instanceof Color ? this.strokeColor.android : this.layoutView.getBoxStrokeColor();
220-
const colorStateList = getFullColorStateList(activeColor, color);
221+
const inactiveColor = this.strokeInactiveColor instanceof Color ? this.strokeInactiveColor.android : undefined;
222+
const colorStateList = getFullColorStateList(activeColor, inactiveColor, color);
221223
this.layoutView.setBoxStrokeColorStateList(colorStateList);
222224
}
223225
}
@@ -226,7 +228,8 @@ export class TextView extends TextViewBase {
226228
const color = value instanceof Color ? value.android : value;
227229
if (this.layoutView.setBoxStrokeColorStateList) {
228230
const inactiveColor = this.strokeInactiveColor instanceof Color ? this.strokeInactiveColor.android : undefined;
229-
const colorStateList = getFullColorStateList(color, inactiveColor);
231+
const disabledColor = this.strokeDisabledColor instanceof Color ? this.strokeDisabledColor.android : undefined;
232+
const colorStateList = getFullColorStateList(color, inactiveColor, disabledColor);
230233
this.layoutView.setBoxStrokeColorStateList(colorStateList);
231234
} else {
232235
this.layoutView.setBoxStrokeColor(color);

src/textview/textview.common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export abstract class TextViewBase extends NSTextView {
1616
@cssProperty error: string;
1717
@cssProperty strokeColor: Color;
1818
@cssProperty strokeInactiveColor: Color;
19+
@cssProperty strokeDisabledColor: Color;
1920
@cssProperty floatingColor: Color;
2021
@cssProperty floatingInactiveColor: Color;
2122
@cssProperty buttonColor: Color;

0 commit comments

Comments
 (0)