mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
This is the first step in adding states to the outline text box. The states implementation plan is to handle the box's states similar to how TextInputLayout already handles states, and moving the box stroke color to be a color int sets the stage for that change. In a nutshell, the states implementation plan is to add an updateBoxState() method in TextInputLayout's overridden drawableStateChanged(), and change the parameters affected by state in that method. Since updateBoxState() will handle changing the colors, and since GradientDrawable doesn't have support for ColorStateLists pre-21, it makes more sense for mBoxStrokeColor to be a color int. That way, TextInputLayout can handle all of the states the same way, instead of flagging different versions and essentially building states twice. This commit changes the mBoxStrokeColor reference to point to a color int resource, and updates the getters, setters, documentation, the catalog demo entry, and the relevant tests to reflect the new variable type. PiperOrigin-RevId: 171831287
Material Components for Android
Material Components for Android (MDC-Android) help developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android apps.
Material Components for Android are based on Android’s Design support library (DesignLib) which will continue to be released as part of Android’s SDK.
Useful Links
- All Components
- Contributing
- Class documentation (external site)
- MDC-Android on Stack Overflow (external site)
- Android Developer’s Guide (external site)
- Material.io (external site)
- Material Design Guidelines (external site)
Documentation
Description
Languages
Java
99.9%
Kotlin
0.1%