53 Commits

Author SHA1 Message Date
marianomartin
991927fd8f Add an attribute for materialButtonOutlinedStyle
It's a common use case to want to mix up buttons with outlined buttons and an attribute facilitates reusing layouts with different themes.

PiperOrigin-RevId: 234189427
2019-02-24 14:16:47 -05:00
dniz
679abf1218 Delete colorBackgroundFloating attr definition (it's defined in AppCompat and we don't use it anymore)
PiperOrigin-RevId: 233761304
2019-02-24 14:09:38 -05:00
Material Design Team
63d11da7e5 Extended FAB.
Implementation of an ExtendedFloatingActionButton which extends from a MaterialButton.

PiperOrigin-RevId: 231682739
2019-02-11 11:04:14 -08:00
melaniegoetz
eefb5d4d77 Create ThemeOverlay's for BottomSheets, changes bottomSheetDialogTheme to use Overlay instead of full theme reference
PiperOrigin-RevId: 230944305
2019-01-25 15:23:16 -05:00
dniz
11df79f95c Clean up Gradle build shorthands for appcompat/androidx libraries
PiperOrigin-RevId: 229369959
2019-01-18 14:13:26 -05:00
gauthams
11ae93ddc1 Refactor custom view inflation logic into shouldInflateAppCompatButton method, and make it protected rather than private.
PiperOrigin-RevId: 226256921
2018-12-21 11:34:51 -05:00
gauthams
b07eb82f31 Fix MaterialButton inflation issue for API 24 and 25
PiperOrigin-RevId: 226235558
2018-12-21 11:33:46 -05:00
ldjesper
52c5e72d81 Remove top level dialog attributes in favor of materialAlertDialogTheme
PiperOrigin-RevId: 226210511
2018-12-21 11:30:35 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
Material Design Team
649828b6df Automated g4 rollback of changelist 225407398
PiperOrigin-RevId: 225418035
2018-12-21 10:47:43 -05:00
ldjesper
198b614e21 Remove new top level attributes in favor of scoped materialAlertDialogTheme
PiperOrigin-RevId: 225407398
2018-12-21 10:43:26 -05:00
ldjesper
831ad7dde7 a11y for selection control touch targets
PiperOrigin-RevId: 222898711
2018-12-06 11:24:17 -05:00
dniz
8073c98d60 Update MDC DayNight themes to use regular and -night qualifiers and remove
-night colors

PiperOrigin-RevId: 222079148
2018-11-26 07:57:12 -05:00
dniz
0bef80a76b Update colors for DayNight themes
PiperOrigin-RevId: 221137528
2018-11-16 11:26:51 -05:00
dniz
3637c23078 Dark theme color palette
PiperOrigin-RevId: 219143246
2018-11-01 16:05:24 -07:00
ldjesper
5258d3ddc1 Update Dialog Title styling to material design specs
PiperOrigin-RevId: 217565758
2018-10-28 18:27:27 -04:00
ldjesper
515e84775a Automated g4 rollback of changelist 216865347
PiperOrigin-RevId: 216874169
2018-10-28 18:11:59 -04:00
ldjesper
8942b12fff Dialog Title Styling
PiperOrigin-RevId: 216865347
2018-10-28 17:58:20 -04:00
marianomartin
b5486196e6 Use theme attributes to update menus style
PiperOrigin-RevId: 215918907
2018-10-11 18:05:28 -04:00
Material Design Team
d509eb90a6 Automated g4 rollback of changelist 215569147
PiperOrigin-RevId: 215602434
2018-10-11 18:03:54 -04:00
marianomartin
0e7f80b42b Use theme attributes to update menus style
PiperOrigin-RevId: 215569147
2018-10-11 18:00:51 -04:00
ldjesper
4cda2e3879 Add Material Alert Dialog Layout with message text styling
Changes the message text of Alert Dialogs to use the theme style of textAppearenceBody1.

PiperOrigin-RevId: 215388398
2018-10-02 14:56:27 -04:00
cketcham
3de44ca7ac Add shapes theming infrastructure.
Add shapeAppearance and shapeAppearanceOverlay attributes. These attributes combine to support shapes theming. ShapeAppearance is modeled after TextAppearance. A shapeAppearance attribute contains a style reference that is meant to be defined at the theme level. Since changing anything defined in the shapeAppearance would clobber everything else in the ShapeAppearance, the shapeAppearanceOverlay attribute is provided for clients to modify the shapeAppearance.

PiperOrigin-RevId: 215273652
2018-10-02 14:53:40 -04:00
Material Design Team
a681567504 Automated g4 rollback of changelist 215242636
PiperOrigin-RevId: 215260729
2018-10-02 14:52:47 -04:00
cketcham
432b46cc83 Add shapes theming infrastructure.
Add shapeAppearance and shapeAppearanceOverlay attributes. These attributes combine to support shapes theming. ShapeAppearance is modeled after TextAppearance. A shapeAppearance attribute contains a style reference that is meant to be defined at the theme level. Since changing anything defined in the shapeAppearance would clobber everything else in the ShapeAppearance, the shapeAppearanceOverlay attribute is provided for clients to modify the shapeAppearance.

PiperOrigin-RevId: 215242636
2018-10-02 14:21:40 -04:00
connieshi
b698c972cb Add MDC bridge theme target that does not include all of material components as a transitive dependency.
PiperOrigin-RevId: 214995615
2018-10-01 12:24:09 -04:00
ldjesper
9cbfddc61b Add attributes to disable Material Theme Colors for Selection Controls
These attributes are necessary for custom drawables.

PiperOrigin-RevId: 214969700
2018-09-28 17:03:18 -04:00
gauthams
3ec2906ad8 Fix FloatingToolbar improperly inflating MaterialButton on API 23.
This was due to FloatingToolbar using <Button> for its layouts in API 23-25, which got automatically inflated to <MaterialButton> via the custom view inflater in MDC themes. However, the default MaterialButton styling (especially backgroundTint) was overriding the styling in the <Button>, resulting in a broken FloatingToolbar. This issue was not encountered on API 24/25 since there were likely theme/style changes in those versions that override this Button. From API 26 onwards, FloatingToolbar uses a TextView and ImageView instead of Button.

PiperOrigin-RevId: 213517896
2018-09-28 14:54:14 -04:00
ldjesper
c6266f23ef Modify CheckBox to color without alpha.
PiperOrigin-RevId: 212484594
2018-09-14 10:56:49 -04:00
dniz
752b7b2ca1 Use specific color surface resource instead of reusing background
PiperOrigin-RevId: 212432542
2018-09-14 10:55:37 -04:00
melaniegoetz
09b22f37d0 Fix DayNight hardcoding certain color values
PiperOrigin-RevId: 212364719
2018-09-14 10:54:12 -04:00
ldjesper
8a3856922f Style Material RadioButton
PiperOrigin-RevId: 211998722
2018-09-14 10:50:38 -04:00
Material Design Team
5494459666 Adds a Theme.MaterialComponents.DayNight theme
PiperOrigin-RevId: 211539099
2018-09-07 11:51:19 -04:00
dniz
6a1d85f08c Action Bar typography styling
PiperOrigin-RevId: 210604964
2018-08-29 11:31:51 -04:00
gauthams
cfbc6bb50b Reuse color resources rather than having attribute dependency in MDC Bridge themes
PiperOrigin-RevId: 210438272
2018-08-28 16:41:54 -04:00
dniz
498d200f40 Fix Toolbar & ActionBar sizes for large screens
PiperOrigin-RevId: 210361782
2018-08-28 16:41:06 -04:00
cketcham
7b564d1d52 Update default animation spec for BottomSheetDialogs
PiperOrigin-RevId: 209996117
2018-08-28 16:38:35 -04:00
Material Design Team
e8c6a84246 Create the material CheckBox component with a catalog demo.
PiperOrigin-RevId: 209638198
2018-08-28 16:32:59 -04:00
gauthams
15bf27d7cd Update MaterialButton to use new color attributes
PiperOrigin-RevId: 209617286
2018-08-28 16:31:53 -04: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
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
cketcham
018b3825c7 Fix buttons for dialog themes
PiperOrigin-RevId: 205300861
2018-07-19 17:28:27 -04:00
gauthams
2cf1040ca8 Add bridge themes for Material Components
PiperOrigin-RevId: 204852599
2018-07-17 18:11:24 -04:00
dniz
7cd55d872b Add Toolbar styles that use themed text appearances based on type scale
PiperOrigin-RevId: 202636817
2018-07-02 09:50:23 -04:00
dniz
b1a784ce75 Implement new Material Snackbar according to spec
This commit updates MaterialComponents Snackbars to have margins and rounded corners, as well as makes Snackbars styleable at the app theme level via a snackbarStyle attribute.

PiperOrigin-RevId: 202141103
2018-07-02 09:41:41 -04:00
afohrman
7c77374127 Set textInputStyle to Widget.Design.TextInputLayout and remove editTextStyle from the theme.
The editTextStyle is now implicitly set to Widget.AppCompat.EditText.

The background for this change is that all EditTexts in the theme were getting the filled box text field set on it rather than Widget.AppCompat.EditText. Because the TextInputEditText style is set via a ThemeOverlay, simply setting the correct style on the TextInputEditText wouldn't remove the attributes set in the filled box ThemeOverlay. This commit sets textInputStyle to Widget.Design.TextInputLayout to work around that.

This commit also adds a legacy text field demo. This should help ensure that the pre-existing text field isn't changed as a result of other modifications to the text field.

PiperOrigin-RevId: 198758642
2018-05-31 16:32:59 -04:00
marianomartin
663fd7abff add res-public files
PiperOrigin-RevId: 198567215
2018-05-30 17:42:48 -04:00
afohrman
bdb25ff7e3 Use android:padding attributes instead of boxPadding attributes for text field dimensions.
Move to use native android:padding attrs instead of custom boxPadding attributes for text fields. This is accomplished by creating box styles for TextInputEditText, and setting android:padding attributes in those.

The TextInputLayout box styles set the appropriate TextInputEditText style on its child by wrapping the TextInputEditText style in theme overlays. This is kind of neat, since it allows for the user not to have to set a style on both the TextInputLayout and TextInputEditText - the user does not even have to know about the TextInputEditText styles with this pattern. It should also help clear up some confusion over where to set the hint and other areas of haziness between TextInputLayout and TextInputEditText.

The default editTextStyle is set to the filled box style, to match the default TextInputLayout style.

This change removes the box padding attributes, and it also removes the dimension resources in favor of setting them in the style to improve readability.

This commit also changes TextInputEditText constructors to both use a theme attribute in the 3-arg constructor and call through to the TextInputEditText overloaded constructors rather than call the super's constructor from each. This allows the theme attribute set in the theme overlays to take effect.

PiperOrigin-RevId: 198051251
2018-05-30 17:35:13 -04:00
dniz
81c4ece8f7 Remove colorPrimaryLight, colorSecondaryLight, and colorSecondaryDark
PiperOrigin-RevId: 197093793
2018-05-22 13:56:47 -04:00
dniz
e4c8535352 Remove backlayer and materialswitch
PiperOrigin-RevId: 195148145
2018-05-02 17:07:28 -04:00