333 Commits

Author SHA1 Message Date
marianomartin
92e34f6830 MaterialCardView keeps shrinking its inner content when changing its strokeWidth
PiperOrigin-RevId: 209028205
2018-08-17 17:18:31 -04:00
marianomartin
09673a5de7 MaterialCardView add ripple drawable to foreground
PiperOrigin-RevId: 208993686
2018-08-17 17:15:51 -04:00
cketcham
43bdfac37b Expose option to slide the BottomAppBar on and off the screen programmatically
PiperOrigin-RevId: 208866469
2018-08-17 17:14:22 -04:00
connieshi
0ced1bcf8c Return early from Chip#setupTouchTargetDelegate If the client didn't specify touchTargetDelegate attribute in xml.
PiperOrigin-RevId: 208717708
2018-08-17 17:13:05 -04:00
connieshi
36a472b22a ChipGroup's layout should include the rightmost child's end margin.
PiperOrigin-RevId: 208515835
2018-08-17 17:12:12 -04:00
Material Design Team
18c93ad9ae Allow setting the size for navigation view icons
PiperOrigin-RevId: 208214420
2018-08-17 17:09:59 -04:00
afohrman
0f5cd3d379 Create a ThemeOverlay for the legacy text field to unset editTextStyle.
The legacy text field had extra spacing from the editTextStyle set in the default textInputStyle. Since explicit styles stack on top of the default style, the editTextStyle with extra padding was set in the default style (which was recently changed to the filled box style) and it was not unset in the legacy style, resulting in the extra spacing.

Adding an empty ThemeOverlay fixes this issue.

PiperOrigin-RevId: 208117313
2018-08-17 17:08:53 -04:00
connieshi
82d02a1112 Call ViewObserver#RemoveOnGlobalLayoutListener to avoid memory leak in Chip.
PiperOrigin-RevId: 208114143
2018-08-17 17:07:33 -04:00
connieshi
0c8dd4f121 Stop unicode wrapping user input strings in Chip#setText.
Remove overridden getText method, and rely on the TextView's implementation.
This also fixes accessibility issues when Talkback granularity is set to "word" or "characters".

PiperOrigin-RevId: 207296625
2018-08-17 16:59:28 -04:00
connieshi
601f2511bc Add localization to Material Design Components lib, initially for chip.
PiperOrigin-RevId: 207265701
2018-08-17 16:58:09 -04:00
marianomartin
2c8209e899 Override Remove view methods in MaterialCardView
PiperOrigin-RevId: 207093142
2018-08-02 18:08:04 -07:00
marianomartin
3b33e5d40f Fix cardview failures, min height should account for content padding to not make the cardview bigger than expected.
PiperOrigin-RevId: 207005747
2018-08-02 18:07:34 -07:00
marianomartin
36cc52f9d8 Add FrameLayout to fix clipping issue with card view
PiperOrigin-RevId: 206958673
2018-08-02 18:06:32 -07:00
connieshi
7449427d36 Each time a chip icon is updated, apply the current chip icon tint.
Fixes bug that only updated chip icon tint if tint is updated after an icon has been set.

PiperOrigin-RevId: 206838032
2018-08-02 18:06:05 -07:00
cketcham
c73ee1b061 Update ThemeEnforcement to correctly read the android:theme attribute from the style
PiperOrigin-RevId: 206579912
2018-08-02 18:04:42 -07:00
gauthams
4564c8c907 Add new color attributes to bridge theme and check for all new attributes in ThemeEnforcement
PiperOrigin-RevId: 206537727
2018-08-02 18:03:20 -07:00
Material Design Team
ee9e754c0a Removed unnecessary complexity
PiperOrigin-RevId: 206320111
2018-08-02 18:02:23 -07:00
cketcham
4f7cf963c4 Automated g4 rollback of changelist 206313825
PiperOrigin-RevId: 206319662
2018-08-02 18:02:01 -07:00
dniz
979e577681 Consume all Snackbar touches with OnTouchListener
PiperOrigin-RevId: 206316703
2018-08-02 18:01:36 -07:00
cketcham
6f714ecc4f Update ThemeEnforcement context to read only the android:theme attribute from the style
PiperOrigin-RevId: 206313825
2018-08-02 18:01:03 -07:00
connieshi
ffa7b10cae Add null check in Chip#setupTouchTargetDelegate
PiperOrigin-RevId: 206215855
2018-08-02 18:00:36 -07:00
cketcham
d1e9dd6427 Fix method name referenced in comment
PiperOrigin-RevId: 206206294
2018-08-02 18:00:12 -07:00
connieshi
516d00d8a6 Add attributes (chipTouchTargetDelegate, chipMinTouchTargetSize) to support chip meeting minimum accessible touch target size.
PiperOrigin-RevId: 206197663
2018-08-02 17:58:34 -07:00
cketcham
40696b02b7 Fix jagged edges on cutout for BottomAppBar
PiperOrigin-RevId: 206194466
2018-08-02 17:57:09 -07:00
Material Design Team
4983b60975 Fix potential bug with shared pointF
PiperOrigin-RevId: 206128392
2018-08-02 17:55:02 -07:00
cketcham
7487a539f7 Add support for ThemeOverlays with the default style attr in MaterialCardView and TextInputLayout
PiperOrigin-RevId: 206004683
2018-08-02 17:54:28 -07:00
dniz
fa9d470741 Fix Snackbar issue where touches are not consumed for non-a11y users and add dismiss action for a11y users
PiperOrigin-RevId: 205450300
2018-07-20 18:27:32 -04:00
cketcham
018b3825c7 Fix buttons for dialog themes
PiperOrigin-RevId: 205300861
2018-07-19 17:28:27 -04:00
connieshi
bc6a266edf Update chip to use textappearance theme attributes, and enforce textappearance check
PiperOrigin-RevId: 205120039
2018-07-19 11:03:13 -04:00
marianomartin
4088fdb1ed Implement getConstantState in CircularBorderDrawable
This fixes a crash on FloatingActionButtonLollipop when it tries to set the background. It calls mutate which calls it on this drawable. Which calls getConstantState().newDrawable()

PiperOrigin-RevId: 205108784
2018-07-19 11:02:32 -04:00
gauthams
2cf1040ca8 Add bridge themes for Material Components
PiperOrigin-RevId: 204852599
2018-07-17 18:11:24 -04:00
marianomartin
f777c67633 Override snackbar duration for touch exploration
Show the Snackbar for indefinite time if touch exploration is enabled and it has an action.
Also make focusable instead of clickable so it doesn't read double tap to interact

PiperOrigin-RevId: 204821491
2018-07-17 18:10:38 -04:00
connieshi
a4292a11de Always compute layout width / height and call setMeasuredDimension even when there are no children instead of delegating to View (which was erroneously setting the height to take up all available space).
This fixes a bug that causes the chipgroup to erroneously takeover the entire height of the screen.

PiperOrigin-RevId: 204810068
2018-07-17 18:10:11 -04:00
marianomartin
ba696b6984 Verify typography subsystem is complete for Bottom Navigation
PiperOrigin-RevId: 204798141
2018-07-17 18:09:19 -04:00
afohrman
5b2d4d667a Allow bottom nav items to gain focus on keyboard traversal.
Set the bottom nav items to always be focusable. This addresses a bug in which bottom nav items didn't gain focus by keyboard pre-O.

PiperOrigin-RevId: 204518309
2018-07-17 18:08:53 -04:00
connieshi
36c01edeb2 Switch ChipGroup to inherit from FlowLayout.
PiperOrigin-RevId: 204296714
2018-07-12 16:18:34 -04:00
connieshi
3705f84c2e Stop explicitly setting ImportantForAccessibility to be true because:
1) It's no longer necessary because Chip extends AppCompatCheckbox and TextView sets this if it's not explicitly set by the user
    2) This prevents developers from indicating that a chip should not be exposed to accessibility.

PiperOrigin-RevId: 204189419
2018-07-12 16:18:20 -04:00
cketcham
e22213ba58 Automated g4 rollback of changelist 204005581
PiperOrigin-RevId: 204142484
2018-07-11 15:22:03 -04:00
Material Design Team
8624748ed8 Use getText() in ChipTouchHelper for consistency
PiperOrigin-RevId: 204138629
2018-07-11 15:21:45 -04:00
connieshi
602a9b63a4 Switch ChipGroup to inherit from FlowLayout.
PiperOrigin-RevId: 204005581
2018-07-11 15:17:56 -04:00
cketcham
2cb77c9331 Update Snackbar documentation to include LENGTH_INDEFINITE
PiperOrigin-RevId: 203952007
2018-07-11 15:17:32 -04:00
connieshi
662aa06b77 Add null check before access attribute set.
PiperOrigin-RevId: 203830200
2018-07-11 15:17:15 -04:00
cketcham
ad1d5f2614 Use ViewCompat.getPaddingEnd() instead of getPaddingEnd for backwards compatibility in Chip
PiperOrigin-RevId: 203812719
2018-07-09 17:27:17 -04:00
connieshi
84c6020605 Check if a user explicitly set any of the deprecated xml attributes but not the updated counterparts:
chipIconEnabled vs. chipIconVisible
    closeIconEnabled vs. closeIconVisible
    checkedIconEnabled vs. checkedIconVisible

PiperOrigin-RevId: 203804667
2018-07-09 15:01:40 -04:00
afohrman
631301e4b1 Update outline box to take on the counter overflow color when overflowed.
PiperOrigin-RevId: 203775391
2018-07-09 15:01:23 -04:00
connieshi
aedfc1cf7c Prevent users from setting the gravity on chips, chip text must be vertically center and start aligned.
PiperOrigin-RevId: 203767756
2018-07-09 15:00:54 -04:00
afohrman
61672b79a4 Remove prefixes from variables in TextInputLayout.
mHelperTextAppearance and mErrorTextAppearance slipped by when the fields were changed.

PiperOrigin-RevId: 203173302
2018-07-09 15:00:21 -04:00
gauthams
fb148f47a4 Use onDraw() instead of draw() in MaterialButton
PiperOrigin-RevId: 203012234
2018-07-09 14:59:09 -04:00
marianomartin
8aa6261493 Icon only buttons
PiperOrigin-RevId: 202660201
2018-07-02 09:51:34 -04:00
connieshi
6020fcdbf1 Fix API issue with icon visibility.
Deprecate *iconEnabled methods to is*iconVisible and setIs*iconVisible methods.

PiperOrigin-RevId: 202658616
2018-07-02 09:50:53 -04:00