material-components-android
material-components-android copied to clipboard
[TextInputLayout] Support boxBackgroundColor state for style OutlinedBox
I'm using version 1.2.0 of the library, and I can get the background of a TextInputLayout to react to changes of focused state if using the FilledBox style, but it doesn't work if using the OutlinedBox style.
It seems a wanted result:
https://github.com/material-components/material-components-android/blob/34df6d91f1164ec981616346e7b675c1e69d4134/lib/java/com/google/android/material/textfield/TextInputLayout.java#L3917-L3926
Why would we restrict this to only FilledBox and exclude OutlinedBox ? Specially where the former we can set a background color, but cannot have it react to changes in focus state - that seems odd.
Why is this still not changed? Does devs does not want us to set OutlinedBox background depending on state?
Same need however i can set the boxBackgroundColor in the xml.
After doing it, render is ugly due to the label position. I think that's why this property is not compatible with OutlinedBox.