50 Commits

Author SHA1 Message Date
isabellekim
682f65d488 Putting bottom navigation demo controls in a ScrollView so they don't overlap with bottom navigation on smaller devices for demos with more controls.
PiperOrigin-RevId: 214821009
2018-09-28 16:58:11 -04:00
melaniegoetz
318da234b8 Add base elevation demo to catalog
PiperOrigin-RevId: 214300342
2018-09-28 16:27:25 -04:00
dniz
868e80ed6f Add support for anchoring Snackbars to Views so they can be placed above
navigational elements and FABs

This commit also disables the pushing up of FABs when an anchor view is set

PiperOrigin-RevId: 214287486
2018-09-28 16:24:01 -04:00
ldjesper
864b907e79 Dialog Demos
PiperOrigin-RevId: 213879982
2018-09-28 16:13:59 -04:00
melaniegoetz
69eebe785f TabLayout functionality to set label visibility
PiperOrigin-RevId: 213554775
2018-09-28 14:54:44 -04:00
melaniegoetz
baa8cb404d Elevation Demo Skeleton
PiperOrigin-RevId: 213061884
2018-09-28 14:43:11 -04:00
leticiars
42faf266f2 Adding textfield with leading icon demo to catalog.
PiperOrigin-RevId: 212473526
2018-09-14 10:56:21 -04:00
melaniegoetz
8f02385c84 Color subsystem updates for MDC-FAB
PiperOrigin-RevId: 212311827
2018-09-14 10:53:01 -04:00
gauthams
63a23c7ed1 Fix padding in RTL button demos
PiperOrigin-RevId: 211143213
2018-09-07 11:36:04 -04:00
connieshi
52ff5e1eb3 Add GM chipgroup style. Configure GM Catalog's chip group example to meet Android's recommended min touch target.
PiperOrigin-RevId: 210903536
2018-08-31 11:12:41 -04:00
dniz
6a1d85f08c Action Bar typography styling
PiperOrigin-RevId: 210604964
2018-08-29 11:31:51 -04:00
Material Design Team
56ee534de2 Creates and colors SwitchMaterial
PiperOrigin-RevId: 210574240
2018-08-28 16:44:02 -04:00
gauthams
14e9a020a1 Update TabLayout to use new color attributes
PiperOrigin-RevId: 210553777
2018-08-28 16:42:54 -04:00
Material Design Team
3bb9a248a4 Catalog Demo for Material Radio Button
PiperOrigin-RevId: 209981850
2018-08-28 16:36:52 -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
Material Design Team
3d4b28bc5c Switch catalog demo - SwitchCompat based
PiperOrigin-RevId: 209150795
2018-08-17 17:23:47 -04:00
afohrman
a91d87996b Add helper text customization controls to text field demo.
PiperOrigin-RevId: 206780816
2018-08-02 18:05:39 -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
Material Design Team
e3d1a07212 Updated the main Bottom Navigation demo to remove the legacy comparison.
The Legacy comparison still exists in the other demos.

PiperOrigin-RevId: 206149347
2018-08-02 17:56:08 -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
marianomartin
8aa6261493 Icon only buttons
PiperOrigin-RevId: 202660201
2018-07-02 09:51:34 -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
gauthams
58df7b8baa Fixing MaterialButton padding API surface
PiperOrigin-RevId: 202584064
2018-07-02 09:49:33 -04:00
marianomartin
cbf0b7a7cf Menus in catalog
PiperOrigin-RevId: 202470100
2018-07-02 09:44:31 -04:00
marianomartin
548963a9e6 Delete unused assets and add placeholder
PiperOrigin-RevId: 202322948
2018-07-02 09:44:04 -04:00
marianomartin
8ef311fd96 Change icons in MDC catalog
PiperOrigin-RevId: 202313800
2018-07-02 09:43:36 -04:00
cketcham
841ba156fc Automated g4 rollback of changelist 199530791
PiperOrigin-RevId: 201188669
2018-06-20 17:29:57 -04:00
connieshi
3f00c13ebe Fix api issues, defer to TextView to render the chip text and ChipDrawable to render everything else.
List of text related attributes/methods supported with this approach:
    android:autoLink
    android:hint
    android:text
    android:textAllCaps
    android:textAppearance
    android:textColor

    android:textColorHint
    android:textColorLink
    android:textIsSelectable
    android:textScaleX
    android:textSize
    android:textStyle
    android:typeface
    android:fontFamily

    Not supported:
    android:textColorHighlight
    android:textColorLink

PiperOrigin-RevId: 200578044
2018-06-20 17:27:20 -04:00
afohrman
b087cbad7a Roll back deletion of FAB attachment functionality.
PiperOrigin-RevId: 199530791
2018-06-20 17:24:55 -04:00
marianomartin
0b4cd4873d Fix crash in themeswitcher
we are only obtaining R.attr.colorSecondary for the secondary pallete
so the getColor(1, ..) behaves weirdly crashing randomely.

PiperOrigin-RevId: 199530617
2018-06-20 17:24:36 -04:00
cketcham
cdb99838c6 Don't allow the fab to be detached from the BottomAppBar unless the fab isn't visible, or the BottomAppBar is scrolled off the screen
PiperOrigin-RevId: 199511216
2018-06-20 17:24:01 -04:00
afohrman
235917148f Add spacing between text fields in text field demos.
PiperOrigin-RevId: 198769845
2018-05-31 17:04:10 -04:00
afohrman
f2ebf56e21 Rename text field outlined style from "Outline" to "Outlined".
This commit updates the style names for the outlined text field box from "Outline" to "Outlined.

Widget.MaterialComponents.TextInputLayout.OutlineBox -> Widget.MaterialComponents.TextInputLayout.OutlinedBox, and
Widget.MaterialComponents.TextInputEditText.OutlineBox -> Widget.MaterialComponents.TextInputEditText.OutlinedBox.

This name matches spec and is closer to what is used on the other platforms.

PiperOrigin-RevId: 198768731
2018-05-31 16:39:44 -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
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
cketcham
9cc6c63d20 Add space for MaterialButtons in the BottomAppBar demo
PiperOrigin-RevId: 197933058
2018-05-30 17:32:00 -04:00
connieshi
a71326896a Use the android:text attribute instead of chipText attribute to specify text label for ChipDrawable.
This is one in a series of planned changes that aim to delegate rendering a Chip's text to TextView instead of ChipDrawable.

PiperOrigin-RevId: 197780081
2018-05-30 17:19:38 -04:00
dniz
49b6f396ba Update AppBarLayout to support lift on scroll behavior
PiperOrigin-RevId: 197607028
2018-05-30 17:17:09 -04:00
dniz
81c4ece8f7 Remove colorPrimaryLight, colorSecondaryLight, and colorSecondaryDark
PiperOrigin-RevId: 197093793
2018-05-22 13:56:47 -04:00
afohrman
1cad4007dc Roll forward box background fix.
PiperOrigin-RevId: 197041463
2018-05-17 19:45:46 -04:00
afohrman
2cf2cfd90e Add structure for text field demos and split demos into filled and outline demos.
Create base classes for text field demos to unify shared logic and handle optionally controllable text field demos. This new structure is used to split the text field demo into filled and outline controllable demos.

This commit also contains some cleanup for text field demos in general (removes an extra string, converts anonymous listeners to lambdas, etc.)

PiperOrigin-RevId: 196999248
2018-05-17 19:44:01 -04:00
afohrman
4700966a38 Roll back box background changes.
PiperOrigin-RevId: 196762626
2018-05-16 11:49:37 -04:00
afohrman
e566a535ac Ensure box background is drawn behind other text field elements.
This commit:
- Moves the draw calls in TextInputLayout#draw to happen in a better order: now, the background is drawn first, then TextInputLayout and its children, then the hint. This prevents the box from drawing on top of other text field elements.
- Updates box background setters and getters to modify boxBackgroundColor instead of defaultBoxBackgroundColor.
- Adds a demo for filled box background color changes to the text field demo.

PiperOrigin-RevId: 196748102
2018-05-16 11:48:54 -04:00
marianomartin
fa339c71ce ThemeSwitcher radio buttons have no color
PiperOrigin-RevId: 196138598
2018-05-16 11:42:36 -04:00
connieshi
56b6432e37 Add support to ellipsize chip text.
When converting float to int value for intrinsic width, round instead of cast.
Round float values When determining whether text needs to be clipped to avoid overly aggressive clipping (and ellipsizing).

Rewrote layout for the chip example in demo app due to a known GridLayout.

PiperOrigin-RevId: 195957006
2018-05-09 13:39:23 -04:00
marianomartin
c7e01de03d Fix divider not showing in catalog in RTL
PiperOrigin-RevId: 195878162
2018-05-08 19:54:59 -04:00
Material Design Team
da42189a47 Added Outlined buttons to style and to MDC Catalog Buttons example.
PiperOrigin-RevId: 195479574
2018-05-07 13:37:36 -04:00
cketcham
a4f5cdb568 Use shared resources for BottomAppBar and BottomDrawer demos
PiperOrigin-RevId: 195463305
2018-05-07 13:37:16 -04:00
dniz
d0e4cc93a9 Set up MDC Catalog build and docs
PiperOrigin-RevId: 195135469
2018-05-02 15:45:21 -04:00