114 Commits

Author SHA1 Message Date
Material Design Team
0100f31585 Automated g4 rollback of changelist 188751614
PiperOrigin-RevId: 188794252
2018-03-12 19:34:02 -04:00
afohrman
3b0ed4aa6c Fix typos in theme/attrs.xml.
PiperOrigin-RevId: 188790462
2018-03-12 19:32:39 -04:00
Material Design Team
16fb95014d Update TextInputLayout to support setting the default and hint text colors.
This is necessary to support changing hint text color at runtime when the color is not already stored as a resource.

PiperOrigin-RevId: 188751614
2018-03-12 19:28:35 -04:00
dniz
81bdf025ca Update MaterialCardView to use foreground instead of background for stroke
- Fixes issue where cardUseCompatPadding attribute was not being respected due to overriding of CardView's background

PiperOrigin-RevId: 188484199
2018-03-12 12:57:24 -04:00
gauthams
8dbb9b24a2 Add snackbarButtonStyle attribute
PiperOrigin-RevId: 188410794
2018-03-12 12:57:07 -04:00
gauthams
320b5b38d3 Fix crash in BottomSheetBehavior
PiperOrigin-RevId: 188410031
2018-03-12 12:56:46 -04:00
gauthams
2608666d33 Remove alertDialogTheme, not necessary if using AppCompat AlertDialogs
PiperOrigin-RevId: 188379434
2018-03-12 12:56:27 -04:00
dniz
5014817935 Update AppBarLayout Behavior to support snapping to child view's margins
PiperOrigin-RevId: 188368805
2018-03-12 12:55:50 -04:00
Material Design Team
315954df45 Fix an accessibility tree-node cycle that caused the Accessibility Scanner to crash when scanning the Chips accessibility.
PiperOrigin-RevId: 188120065
2018-03-12 12:55:27 -04:00
gauthams
d2d963e248 Fix incorrect alertDialogTheme in light theme
PiperOrigin-RevId: 188119922
2018-03-12 12:55:16 -04:00
Material Design Team
b0496f1572 Make material-design shapes depend on compat only.
In support library we hit the issue, that we run out of fields numbers.
It happens due to R files that duplicate reference on the resources.

PiperOrigin-RevId: 188043913
2018-03-12 12:54:51 -04:00
cketcham
50e96399fa Handle BottomAppBar with no FAB
This change allows the BottomAppBar to not show a cutout if the FAB is not anchored to it using the CoordinatorLayout anchorId, or if the FAB is not visible. This change also allows the BottomAppBar to listen to show/hide animation changes so it can synchronize its animation to hide and show the cradle with the animation to hide and show the FAB.

PiperOrigin-RevId: 188024600
2018-03-12 12:54:31 -04:00
Material Design Team
1bd0b7f129 Automated g4 rollback of changelist 187953030
PiperOrigin-RevId: 187959742
2018-03-12 12:54:16 -04:00
gauthams
b7d57944ef Add snackbarButtonStyle attribute
PiperOrigin-RevId: 187953030
2018-03-12 12:54:01 -04:00
gauthams
00efc03a35 Fix button theming issue when alert dialog was created with no style specified
PiperOrigin-RevId: 187930168
2018-03-12 12:53:49 -04:00
gauthams
68f703ffba Add tab indicator animation duration attribute, and set it for our tab styles
PiperOrigin-RevId: 187663452
2018-03-12 12:53:24 -04:00
gauthams
f9dec1498f Inflate MaterialButton for all <Button> tags if you are using a Material Design theme
PiperOrigin-RevId: 187563154
2018-03-12 12:53:06 -04:00
gauthams
eeb68dae87 Update button padding when button icon is set programmatically
PiperOrigin-RevId: 187236867
2018-03-12 12:52:53 -04:00
gauthams
70ab609d74 Tab indicator should match width of entire custom view, if provided, not just custom text and icon view
PiperOrigin-RevId: 187236554
2018-03-12 12:52:35 -04:00
cketcham
ecb326ebb1 Add Light and Dark themes for MaterialCardView
PiperOrigin-RevId: 187212600
2018-03-12 12:52:20 -04:00
Material Design Team
6f71c37978 Remove the cornerRadius attribute loading from the MaterialCardViewHelper, and read the value from the MaterialCardView#getRadius when creating the background drawable.
This fixes an ArrayIndexOutOfBoundsException that happened when the helper loaded attributes.

PiperOrigin-RevId: 187142581
2018-03-12 12:51:55 -04:00
afohrman
46a1c2e5eb Restrict direct usage of shapes to the LibraryGroup.
PiperOrigin-RevId: 186700242
2018-03-12 12:51:21 -04:00
afohrman
644c3d77bd Implement pared down version of Flexbox.
Remove dependency on flexbox to avoid pulling in the entire library.

PiperOrigin-RevId: 186699263
2018-03-12 12:49:22 -04:00
cketcham
29856e9e8b Automated g4 rollback of changelist 186498341
PiperOrigin-RevId: 186535770
2018-03-12 12:48:23 -04:00
gauthams
85c2bf1479 Set tab style to .Colored style variant for the dark theme
PiperOrigin-RevId: 186501713
2018-03-12 12:48:09 -04:00
afohrman
e60ff13c1b Add shape and bottomappbar to build.
PiperOrigin-RevId: 186501402
2018-03-12 12:46:29 -04:00
cketcham
9b8f69d5ef Automated g4 rollback of changelist 186476270
PiperOrigin-RevId: 186498341
2018-03-12 12:45:36 -04:00
Material Design Team
8a9e021c44 Automated g4 rollback of changelist 186467179
PiperOrigin-RevId: 186476270
2018-03-12 12:45:14 -04:00
cketcham
b8e1399b6f Add default component style for BottomAppBar
This commit also fixes the style for Dark Theme and adds the BottomAppBar demo to the catalog.

PiperOrigin-RevId: 186467179
2018-03-12 12:44:52 -04:00
afohrman
751e6c1e70 Use design_error instead of error_color_material.
PiperOrigin-RevId: 186458565
2018-03-12 12:44:38 -04:00
afohrman
524e475e05 Set bottom nav style to the .Colored style variant for the dark theme.
PiperOrigin-RevId: 186357811
2018-03-12 12:44:19 -04:00
Material Design Team
bf30083398 Add base style for Bottom Sheets
PiperOrigin-RevId: 186348361
2018-03-12 12:44:05 -04:00
afohrman
9e39c9f06f Set default style for TextInputLayout in constructor.
PiperOrigin-RevId: 186339747
2018-03-12 12:42:42 -04:00
afohrman
e8c48d8692 Add helper text to onPopulateAccessibilityEvent.
And make helper text be read out after the label/hint is read out in TalkBack.

PiperOrigin-RevId: 185995405
2018-03-12 12:42:22 -04:00
dniz
a48c0cb3ba Move lib/AndroidManifest.xml into lib/java/android/support/design
PiperOrigin-RevId: 185918155
2018-03-12 12:42:08 -04:00
afohrman
deb50914cb Support RTL for cutout.
Make the CutoutDrawable draw itself in the correct bounds when in RTL mode. This involves changing CollapsingTextHelper#getCollapsedTextActualBounds to return bounds that account for RTL.

PiperOrigin-RevId: 185916657
2018-03-12 12:41:31 -04:00
afohrman
73338efbe0 Set CutoutDrawable bounds before the first draw.
Set cutout bounds in onLayout to make sure that they're set by the time the first draw happens.  This fixes an issue where the CutoutDrawable was drawn with incorrect bounds if setText was called on the TextInputEditText before it was laid out, by ensuring that the cutout bounds are set before the first draw pass.

PiperOrigin-RevId: 185877643
2018-03-12 12:41:13 -04:00
cketcham
f9e2f23b3c Add BottomDrawer component which allows for easily showing content from the bottom of the screen.
PiperOrigin-RevId: 185863597
2018-03-12 12:40:54 -04:00
dniz
a5848c569e Format default material component styles
PiperOrigin-RevId: 185673907
2018-03-12 12:40:21 -04:00
Material Design Team
c9e56c9959 Create a new default style for NavigationView and move the existing Design style to new package.
PiperOrigin-RevId: 185658659
2018-03-12 12:39:42 -04:00
afohrman
613eaea7be Add icon size attribute and demo to bottom nav.
Adds an itemIconSize attribute, setters, getters, and tests to BottomNavigationView, as well as a Catalog demo for icon size with a slider.

PiperOrigin-RevId: 185609075
2018-03-12 12:39:06 -04:00
afohrman
f3d9a07b1f Add default bottom nav component style attribute in BottomNavigationView constructor.
PiperOrigin-RevId: 185562589
2018-03-12 12:38:48 -04:00
afohrman
490f7f9595 Automated g4 rollback of changelist 185533755
PiperOrigin-RevId: 185543163
2018-03-12 12:38:33 -04:00
afohrman
85952c42a3 Use default style in TIL and bottom nav constructors.
PiperOrigin-RevId: 185533755
2018-03-12 12:38:16 -04:00
dniz
a0e14d8d7c Fix MaterialButton Gradle build
PiperOrigin-RevId: 185464986
2018-03-12 12:37:57 -04:00
markwei
44236706b5 Use app:fontFamily instead of android:fontFamily to support pre-16 devices.
PiperOrigin-RevId: 184906896
2018-03-12 12:37:33 -04:00
gauthams
df0abdb151 Automated g4 rollback of changelist 184658131
PiperOrigin-RevId: 184894533
2018-03-12 12:37:05 -04:00
markwei
62d6866220 Change tonal palette representation in theme from color array, to separate color attributes.
Separate attributes allows components to directly reference a color in the tonal palette in its resources.
Otherwise, the implications of these attributes is the same as the previous color arrays.

PiperOrigin-RevId: 184764971
2018-03-12 12:36:43 -04:00
Material Design Team
0534bfb96a Automated g4 rollback of changelist 184611618
PiperOrigin-RevId: 184658131
2018-03-12 12:35:05 -04:00
gauthams
f602bc975f Update button to support tinting and backwards compatibility with AppCompatButton
PiperOrigin-RevId: 184611618
2018-03-12 12:34:13 -04:00