12 Commits

Author SHA1 Message Date
dniz
ade4df00cb Change Gradle build to output single Maven artifact
PiperOrigin-RevId: 190774454
2018-04-03 11:49:01 -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
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
markwei
2e2c348e6f Add new enforceMaterialTheme attribute that you can set in any style to denote that the style uses a new attribute that must exist in the app theme.
Update ThemeEnforcement to read this new attribute, and check for Material theme.
Change the ThemeEnforcement API to replace Context#obtainStyledAttributes().

See followup CL for how this attribute is used.

PiperOrigin-RevId: 184074635
2018-03-02 15:36:20 -05:00
dniz
c31ef1f1d7 Update Gradle and Maven configurations
PiperOrigin-RevId: 183872033
2018-03-02 14:58:51 -05:00
dcarlsson
d2736442f2 Update how MaterialCardView sets the card background.
Provide a materialCardView theme attribute to fix conflicts with the existing cardView
theme attribute.

PiperOrigin-RevId: 183031703
2018-01-25 18:22:32 -05:00
travisc
04bf0a7c42 Move themes into theme package, invert dependency structures around components.
Previously [most of] the components were either in `widget` or depended on it,
and all theme-related resources (attributes, styles, etc.) were placed there.
This structure doesn't really work for our goals, and makes it harder to split
components by functional area. In this commit, I move all the theme definitions
to `theme` (as well as `dialog` and `bottomsheet` since they also have relevant
themes, and splitting them into separate packages is the only way to make the
dep tree non-circular). Component packages declare their own theme attributes
(e.g. `chip` declares all the theme attributes necessary for chips), as well as
styles, colors, dimens, drawables, etc.

This move isn't entirely complete in this commit, but it is enough to get
things building with this setup. I'll move the rest of the components' resources
in follow-up commits.

PiperOrigin-RevId: 182611275
2018-01-25 18:12:31 -05:00
Material Design Team
5643af73b3 Automated g4 rollback of changelist 181541883
PiperOrigin-RevId: 181544129
2018-01-11 11:26:20 -05:00
dcarlsson
4c1f422765 Update how MaterialCardView handles background color.
PiperOrigin-RevId: 181541883
2018-01-11 11:26:00 -05:00
dcarlsson
036cd85fa5 Add custom attributes to MaterialCardView for stroked outline card styles.
PiperOrigin-RevId: 181046826
2018-01-11 11:12:09 -05:00
dcarlsson
b864c352a1 Add class for MaterialCard.
Add foundation for styles and theme support.

PiperOrigin-RevId: 181045762
2018-01-11 11:11:35 -05:00