172 Commits

Author SHA1 Message Date
afohrman
9405a52851 Split icon text field demos into their own demos.
Now that there are a nice amount of text fields in the controllable text field demos, the controls are hidden in almost all cases. Splitting the icon text field demos into their own demos to avoid hiding the text field demo controls.

PiperOrigin-RevId: 239257310
2019-03-22 16:56:22 -04:00
afohrman
b4bc4fc7b0 Add missing icon text field demos and bring the demos to parity with each other.
This is pre-work for splitting the icon text fields into their own controllable demo screens. This commit:

- Adds an outline toggle password demo
- Removes unnecessary ids
- Reformats layout files
- Cleans up the demos

PiperOrigin-RevId: 239215370
2019-03-22 16:53:38 -04:00
afohrman
cd9923fde9 Remove unnecessary overrides of onCreateDemoView() in the text field catalog demos.
PiperOrigin-RevId: 239055607
2019-03-22 16:38:39 -04:00
afohrman
dcc68fa27e Use "outlined" naming for the outlined text field catalog demo.
The naming in spec changed for outlined text fields, and we changed the style name to reflect that a while back. This commit cleans up old references to "outline" text fields.

PiperOrigin-RevId: 239027786
2019-03-22 16:25:12 -04:00
melaniegoetz
a192f47036 Add dark-theme/elevation overlay support for BottomSheet
PiperOrigin-RevId: 239016572
2019-03-22 16:24:17 -04:00
leticiars
2642ff2697 Adding support for TextInputLayout start icon. It can be set to be just a drawable or, if a OnClickListener is set to it, a button.
For that reason, users should opt to use the start icon API instead of setting a start/left compound drawable on the text field's edit text.

PiperOrigin-RevId: 238984066
2019-03-22 16:19:36 -04:00
afohrman
b15e5ae3a4 Fix legacy bottom navigation catalog demo.
The catalog was setting the legacy bottom nav's android:background, which was overriding the background and ruining the contrast ratios.

PiperOrigin-RevId: 238539046
2019-03-22 16:13:42 -04:00
Chris Banes
78054fe4ea AppBarLayout + WindowInset handling fixes
When AppBarLayout is used with a CollapsingToolbarLayout
child, it currently does not handle WindowInsets
very well. This commit fixes that by properly handling
insets.

The primary issue is when an AppBarLayout is used
with a single Toolbar (very common use case), where
the Toolbar will currently be displayed behind the status bar.

Another issue is with HeaderScrollingViewBehavior.
To workaround CoordinatorLayout using its 'compatible measuring'
for insets, the behavior manually sets the scrolling view to fit
system windows. This has other issues though because
that view will get padded in. Fixed by manually adding the insets
back into the measured dimensions.

Also updated the catalog layouts to make use of
android:fitsSystemWindows=true

Resolves https://github.com/material-components/material-components-android/pull/299

PiperOrigin-RevId: 238396626
2019-03-22 16:08:28 -04:00
dniz
7b594393c8 Dark Theme Elevation Overlay system
PiperOrigin-RevId: 237829773
2019-03-22 16:02:26 -04:00
isabellekim
27fad954b6 Move the color theme overlay attributes to the ThemeSwitcherResourceProvider.
PiperOrigin-RevId: 237352384
2019-03-08 10:10:45 -05:00
ldjesper
0aa32c1ce6 Adds a bare implementation of a date picker not yet ready for use
PiperOrigin-RevId: 237052095
2019-03-08 10:06:25 -05:00
Material Design Team
357ac6a800 Automated g4 rollback of changelist 236909539
PiperOrigin-RevId: 236951421
2019-03-08 10:05:39 -05:00
ldjesper
206ef37620 Adds a bare implementation of a date picker
PiperOrigin-RevId: 236909539
2019-03-08 10:03:53 -05:00
gauthams
4895151cfe Add MaterialToggleButtonGroup demo to MDC Catalog
PiperOrigin-RevId: 236905748
2019-03-08 10:02:59 -05:00
Material Design Team
1cc0a2b4e4 Automated g4 rollback of changelist 236879782
PiperOrigin-RevId: 236896313
2019-03-08 10:00:53 -05:00
ldjesper
8c9f9d5e01 Date Range Picker
PiperOrigin-RevId: 236879782
2019-03-08 09:59:54 -05:00
Material Design Team
d23b2a4d2f Updated Catalog to use themed text appearances.
PiperOrigin-RevId: 235955540
2019-02-27 18:05:45 -05:00
Material Design Team
3250a82231 Added a new card demo with rich media examples.
PiperOrigin-RevId: 235186221
2019-02-24 14:34:41 -05:00
dniz
7b628db5c3 Update MDC Catalog to use baseline Material colors and DayNight theme by
default

PiperOrigin-RevId: 234864670
2019-02-24 14:26:35 -05:00
leticiars
56859415e8 Adding support for a custom end icon for the TextInputLayout.
A user-specified icon can now be set via app:endIconMode="custom" and attributes app:endIconDrawable and app:endIconContentDescription. It is also possible to set a custom OnClickListener via TextInputLayout's end icon API.

PiperOrigin-RevId: 234671237
2019-02-24 14:23:57 -05:00
marianomartin
ba719ba327 Create a Bottom Nav Demo with animated vector drawables.
PiperOrigin-RevId: 234649780
2019-02-24 14:22:55 -05:00
marianomartin
8dcee7dc09 Resubmit make CircularRevealCardView extend MaterialCardView
PiperOrigin-RevId: 234198980
2019-02-24 14:17:29 -05:00
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
leticiars
4882a4f131 Adding clear text button end icon to TextInputLayout.
PiperOrigin-RevId: 234141273
2019-02-24 14:15:28 -05:00
marianomartin
f59949a297 Fix card ripple bug
PiperOrigin-RevId: 233960735
2019-02-24 14:14:49 -05:00
marianomartin
87a9e5aba9 Shape sizes
Allow the ThemeSwitcher to change shape sizes also change it to a BottomSheetdialogFragment to see the content more clearly.

PiperOrigin-RevId: 233839250
2019-02-24 14:10:20 -05:00
leticiars
4c2e9c4004 Changing the TextInputLayout's password toggle implementation into a generic API implementation, which will allow for easier support of future end icons. Also deprecating current password toggle end icon methods and attributes.
This change doesn't include support of a custom end icon yet.

PiperOrigin-RevId: 233645798
2019-02-24 14:07:11 -05:00
marianomartin
4a305c1571 Fix ThemeSwitcher + default fragment bug
Calling activity recreate on the ThemeSwitcher causes the default demo to be launched again
when pressing back which is annoying. If the activity gets recreated for another reason this also repros.
Checking for the bundle to be null seems a reasonable way to only do it the first time.

PiperOrigin-RevId: 233610350
2019-02-24 14:06:31 -05:00
marianomartin
5d52b81e49 Automated g4 rollback of changelist 233595839
PiperOrigin-RevId: 233607169
2019-02-24 14:05:53 -05:00
marianomartin
f42e4327bf make CircularRevealCardView extend MaterialCardView
PiperOrigin-RevId: 233595839
2019-02-24 14:05:03 -05:00
cketcham
846ef8cdce Add basic list item demo based on the specs defined at https://material.io/design/components/lists.html#specs
PiperOrigin-RevId: 233209280
2019-02-11 11:18:33 -08:00
a.v.sokolov
daf34ab8b6 [!] fixed bug with Vector Drawable in Android SDK < 21
* for appropriate work vector on Android SDK < 21 in XML use app:srcCompat="@drawable/example"

GIT_ORIGIN_REV_ID=3ff46175f0edd4bf006cdb5260efd0d18650a5d0
Resolves https://github.com/material-components/material-components-android/pull/273
PiperOrigin-RevId: 232484781
2019-02-11 11:15:34 -08:00
marianomartin
7f45f74302 Combine default card style and checkable style.
PiperOrigin-RevId: 232472062
2019-02-11 11:14:50 -08:00
melaniegoetz
901ba79163 Add BottomSheetBehavior SavedState API
PiperOrigin-RevId: 232328750
2019-02-11 11:13:21 -08:00
marianomartin
33e408d67e Card elevation changes
PiperOrigin-RevId: 231993329
2019-02-11 11:09:05 -08:00
ldjesper
e22d745ec0 materialAlertDialogTheme changes to spec (padding, text opacity, scrim color, divider color)
PiperOrigin-RevId: 231757787
2019-02-11 11:06:48 -08:00
Material Design Team
b701ceaffb Extended FAB demo.
PiperOrigin-RevId: 231689691
2019-02-11 11:05:58 -08:00
ldjesper
9c4bed6503 Hide MaterialDatePickerDialog while the API is influx
PiperOrigin-RevId: 231218156
2019-02-01 12:34:14 -05:00
melaniegoetz
25c3194832 Update Bottomsheet Shape Theming demo to correct Theming colors
by removing reference to full Theme in favor of ThemeOverlay

PiperOrigin-RevId: 230962679
2019-02-01 12:32:16 -05:00
marianomartin
49915ce1f1 Selection Mode Card demo
PiperOrigin-RevId: 230948605
2019-01-25 15:39:07 -05:00
melaniegoetz
30c2612dcb Adding bottomsheet to shape theming demo
PiperOrigin-RevId: 230813553
2019-01-25 14:02:52 -05:00
ldjesper
37a8acf454 Spinner Picker Window Shape
PiperOrigin-RevId: 230618573
2019-01-25 13:59:37 -05:00
marianomartin
20691fec78 Remove long click toggle behavior from MaterialCardView
PiperOrigin-RevId: 230617290
2019-01-25 13:58:17 -05:00
marianomartin
b1592b294f Fix theme switcher before api v21
PiperOrigin-RevId: 230396656
2019-01-22 17:05:15 -05:00
ldjesper
3c67c71b02 Fix spacing and touch targets in Bottom Nav Demo
PiperOrigin-RevId: 230336713
2019-01-22 17:04:30 -05:00
dniz
4f75ec6daa Update FAB to respond to themed cornerFamily
- Remove hardcoded "rounded" corner family from FAB shapeAppearanceOverlay
- Remove BottomAppBar shape toggle override from demo (now that we have a
global switcher)
- Update BottomAppBar demo to base top edge on FAB shape appearance

PiperOrigin-RevId: 229971238
2019-01-22 17:03:27 -05:00
dniz
a352fa0532 Fix color and positioning of Catalog Theme Switcher shape corner family icons
PiperOrigin-RevId: 229930572
2019-01-18 14:28:12 -05:00
dniz
5271bb9614 Fix color of Catalog Favorite Demo heart icon
PiperOrigin-RevId: 229824090
2019-01-18 14:27:30 -05:00
dniz
181e02dd48 Fix color of Catalog Theme Switcher settings gear icon
PiperOrigin-RevId: 229811111
2019-01-18 14:26:13 -05:00
ldjesper
6a89dfd24a Current Android Date Picker Demos
PiperOrigin-RevId: 229592313
2019-01-18 14:22:48 -05:00