5 Commits

Author SHA1 Message Date
afohrman
4700966a38 Roll back box background changes.
PiperOrigin-RevId: 196762626
2018-05-16 11:49:37 -04:00
afohrman
e566a535ac Ensure box background is drawn behind other text field elements.
This commit:
- Moves the draw calls in TextInputLayout#draw to happen in a better order: now, the background is drawn first, then TextInputLayout and its children, then the hint. This prevents the box from drawing on top of other text field elements.
- Updates box background setters and getters to modify boxBackgroundColor instead of defaultBoxBackgroundColor.
- Adds a demo for filled box background color changes to the text field demo.

PiperOrigin-RevId: 196748102
2018-05-16 11:48:54 -04:00
afohrman
886853babb Use start/end for TextInputLayout attributes.
Change attributes, setters, getters, resources, and tests for corner radii and box padding to use start/end instead of left/right. The goal is to make TextInputLayout more RTL friendly; beforehand, RTL use cases would have to directly call padding and corner radii methods with RTL values. After this change, TextInputLayout will determine whether it is in RTL mode and apply the relevant attributes appropriately.

PiperOrigin-RevId: 193565849
2018-04-30 11:35:26 -04:00
afohrman
2eb1f951fc Add feedback when character counter limit is exceeded.
This commit adds feedback once the character counter limit is exceeded (ex: 11/10), and backs off for every other case to avoid spamming the user.

Also adds a content description with a detailed message to the counter view to make it clear what the overflow is.

PiperOrigin-RevId: 193397006
2018-04-30 11:31:45 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00