@@ -127,20 +127,19 @@ export class TextField extends TextFieldBase {
127
127
[ placeholderColorProperty . setNative ] ( value : Color ) {
128
128
const placeholderColor = value instanceof Color ? value . android : value ;
129
129
const floatingColor = this . floatingColor instanceof Color ? this . floatingColor . android : placeholderColor ;
130
-
131
- this . layoutView . setDefaultHintTextColor ( getFullColorStateList ( floatingColor , placeholderColor ) ) ;
130
+ this . layoutView . setHintTextColor ( getFullColorStateList ( floatingColor , placeholderColor ) ) ;
132
131
}
133
132
134
133
[ floatingColorProperty . setNative ] ( value : Color ) {
135
134
const floatingColor = value instanceof Color ? value . android : value ;
136
- const placeholderColor = this . placeholderColor instanceof Color ? this . placeholderColor . android : undefined ;
135
+ const placeholderColor = this . floatingInactiveColor instanceof Color ? this . floatingInactiveColor . android : undefined ;
137
136
this . layoutView . setDefaultHintTextColor ( getFullColorStateList ( floatingColor , placeholderColor ) ) ;
138
137
}
139
138
140
139
[ floatingInactiveColorProperty . setNative ] ( value : Color ) {
141
- const placeholderColor = value instanceof Color ? value . android : value ;
140
+ const floatingInactiveColor = value instanceof Color ? value . android : value ;
142
141
const floatingColor = ( this . floatingColor || ( themer . getPrimaryColor ( ) as Color ) ) . android ;
143
- this . layoutView . setDefaultHintTextColor ( getFullColorStateList ( floatingColor , placeholderColor ) ) ;
142
+ this . layoutView . setDefaultHintTextColor ( getFullColorStateList ( floatingColor , floatingInactiveColor ) ) ;
144
143
}
145
144
[ helperColorProperty . setNative ] ( value ) {
146
145
const color = value instanceof Color ? value . android : value ;
@@ -208,27 +207,30 @@ export class TextField extends TextFieldBase {
208
207
const color = value instanceof Color ? value . android : value ;
209
208
if ( this . layoutView . setBoxStrokeColorStateList ) {
210
209
const activeColor = this . strokeColor instanceof Color ? this . strokeColor . android : this . layoutView . getBoxStrokeColor ( ) ;
211
- const colorStateList = getFullColorStateList ( activeColor , color ) ;
210
+ const disabledColor = this . strokeDisabledColor instanceof Color ? this . strokeDisabledColor . android : undefined ;
211
+ const colorStateList = getFullColorStateList ( activeColor , color , disabledColor ) ;
212
212
this . layoutView . setBoxStrokeColorStateList ( colorStateList ) ;
213
213
}
214
214
}
215
- [ strokeDisabledColorProperty . setNative ] ( value : Color ) {
215
+
216
+ [ strokeColorProperty . setNative ] ( value : Color ) {
216
217
const color = value instanceof Color ? value . android : value ;
217
218
if ( this . layoutView . setBoxStrokeColorStateList ) {
218
- const activeColor = this . strokeColor instanceof Color ? this . strokeColor . android : this . layoutView . getBoxStrokeColor ( ) ;
219
- const colorStateList = getFullColorStateList ( activeColor , color ) ;
219
+ const inactiveColor = this . strokeInactiveColor instanceof Color ? this . strokeInactiveColor . android : undefined ;
220
+ const disabledColor = this . strokeDisabledColor instanceof Color ? this . strokeDisabledColor . android : undefined ;
221
+ const colorStateList = getFullColorStateList ( color , inactiveColor , disabledColor ) ;
220
222
this . layoutView . setBoxStrokeColorStateList ( colorStateList ) ;
223
+ } else {
224
+ this . layoutView . setBoxStrokeColor ( color ) ;
221
225
}
222
226
}
223
-
224
- [ strokeColorProperty . setNative ] ( value : Color ) {
227
+ [ strokeDisabledColorProperty . setNative ] ( value : Color ) {
225
228
const color = value instanceof Color ? value . android : value ;
226
229
if ( this . layoutView . setBoxStrokeColorStateList ) {
230
+ const activeColor = this . strokeColor instanceof Color ? this . strokeColor . android : this . layoutView . getBoxStrokeColor ( ) ;
227
231
const inactiveColor = this . strokeInactiveColor instanceof Color ? this . strokeInactiveColor . android : undefined ;
228
- const colorStateList = getFullColorStateList ( color , inactiveColor ) ;
232
+ const colorStateList = getFullColorStateList ( activeColor , inactiveColor , color ) ;
229
233
this . layoutView . setBoxStrokeColorStateList ( colorStateList ) ;
230
- } else {
231
- this . layoutView . setBoxStrokeColor ( color ) ;
232
234
}
233
235
}
234
236
0 commit comments