215 Commits

Author SHA1 Message Date
Nicola Corti
030354f659 Update Getting Started doc to use alpha07
Looks like the Getting Started doc is still suggesting to use the
alpha06 of MDC. Given that the alpha07 was released several weeks ago,
I'm updating the gradle implementation line to use the latest version of
MDC.

GIT_ORIGIN_REV_ID=d9b4c752f215ec2ac7f420fce6fcef6b96831c84

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

PiperOrigin-RevId: 256418728
2019-07-03 15:42:39 -04:00
Amit Parameshwar
b38cfca81f Fix code highlighting (xml)
GIT_ORIGIN_REV_ID=72a594cb3465d79acb9a1820f83ada3906a5fd1e

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

PiperOrigin-RevId: 256371226
2019-07-03 14:14:51 -04:00
dniz
37534561f2 Add component styles that swap between primary and surface styles depending on light vs dark theme
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application

PiperOrigin-RevId: 256208965
2019-07-03 14:11:49 -04:00
marianomartin
e2eec4aca1 Fix links that were broken during cleanup
Resolves https://github.com/material-components/material-components-android/issues/414

PiperOrigin-RevId: 256034438
2019-07-03 14:06:30 -04:00
dniz
f2db1d9ac9 Add color theme attributes that swap between primary and surface colors depending on light vs dark theme
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application

PiperOrigin-RevId: 255962470
2019-07-03 14:05:18 -04:00
marianomartin
ad8003d8e9 Internal cleanup
PiperOrigin-RevId: 255441067
2019-07-03 13:56:54 -04:00
dniz
5df3bebd63 Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
Will follow-up with TabLayout absolute elevation separately

Resolves https://github.com/material-components/material-components-android/issues/381

PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
ldjesper
1519a1d8d5 Add Picker documentation skeleton
PiperOrigin-RevId: 255193720
2019-06-26 19:15:13 -04:00
marianomartin
d8eeb000c6 Internal cleanup
PiperOrigin-RevId: 254963494
2019-06-26 11:21:03 -04:00
Material Design Team
8715373b2c Fix some minor typos in example usage
PiperOrigin-RevId: 254803794
2019-06-24 17:31:04 -04:00
raajkumars
12024f61a6 Added MaterialTextView component, which supports the ability to pass the line height value via text appearance style.
PiperOrigin-RevId: 254790727
2019-06-24 17:30:00 -04:00
marianomartin
c946144645 Internal cleanup
PiperOrigin-RevId: 254305776
2019-06-24 17:06:45 -04:00
Subhrajyoti Sen
5084a62db9 Add note to not update Gradle to beyond 4.10
The dependency on android-maven-gradle-plugin does not compile on Gradle 5.x.
Refer: https://github.com/dcendents/android-maven-gradle-plugin/blob/develop/README.md

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

GIT_ORIGIN_REV_ID=eed4df09dddae4dcae21bbe11cc47361e3937e5c
PiperOrigin-RevId: 254229290
2019-06-24 17:03:08 -04:00
marianomartin
8002fb7954 Internal cleanup
PiperOrigin-RevId: 253615769
2019-06-18 13:41:56 -04:00
dniz
6783f9e1cd Clean up naming of elevation overlay methods and attributes
PiperOrigin-RevId: 253283047
2019-06-18 13:34:29 -04:00
marianomartin
450300d973 Internal cleanup
PiperOrigin-RevId: 253249607
2019-06-18 13:30:04 -04:00
connieshi
b3980237a4 Rename Tab#showBadge to Tab#getOrCreateBadge(). No longer ensures that the badge is visible. User should call BadgeDrawable#setVisible(boolean).
PiperOrigin-RevId: 252635742
2019-06-18 11:57:19 -04:00
connieshi
6cb11c80c8 Update TabLayout documentation to add badge section.
PiperOrigin-RevId: 250510447
2019-05-29 16:28:56 -04:00
Material Design Team
1e91f1b1a8 fix typo in Switch doc.
PiperOrigin-RevId: 249661239
2019-05-24 14:23:12 -04:00
afohrman
544543d7aa Shape documentation tweaks.
PiperOrigin-RevId: 247273827
2019-05-16 12:35:44 -04:00
afohrman
c0e8dcfa3c Remove explicit MaterialCardView style from MaterialCardView example in shape theming documentation.
Widget styles are set at the theme level, so styles should not be set on widgets unless the theme's widget style should not be used.

PiperOrigin-RevId: 247240560
2019-05-16 12:34:54 -04:00
afohrman
7016a35808 Remove bidirectionality guidance from material.io docs.
PiperOrigin-RevId: 247095107
2019-05-07 17:50:48 -04:00
afohrman
8570f261e3 Change shape theming table formats.
PiperOrigin-RevId: 247083619
2019-05-07 17:32:25 -04:00
dniz
eb05c986a4 Update Dark Theme docs with information and links for Android Q Dark Theme and Material Dark Theme spec
Android Q: https://developer.android.com/preview/features/darktheme
Material Spec: https://material.io/design/color/dark-theme.html

PiperOrigin-RevId: 247082315
2019-05-07 17:31:41 -04:00
dniz
c3918fd332 Add docs metadata to Menu developer doc
PiperOrigin-RevId: 247082057
2019-05-07 17:30:14 -04:00
afohrman
01beb4a9d4 Add shape theming documentation.
PiperOrigin-RevId: 247059441
2019-05-07 17:28:09 -04:00
connieshi
721342f394 Fix path in documentation.
PiperOrigin-RevId: 246915530
2019-05-06 19:28:24 -04:00
connieshi
488f4873bb Add note about BadgeDrawable being under development and not supporting the full range of customization expected of a Material Android component. (e.g. themed attributes)
PiperOrigin-RevId: 246891342
2019-05-06 19:27:34 -04:00
leticiars
931bbef505 Adding documentation for the Exposed Dropdown Menu.
PiperOrigin-RevId: 246854538
2019-05-06 19:25:16 -04:00
leticiars
34df99b4bb Fixing table formatting in TextInputLayout documentation.
PiperOrigin-RevId: 246561639
2019-05-06 10:31:33 -04:00
leticiars
6f1054fe26 Updating MDC Menu documentation.
PiperOrigin-RevId: 246534389
2019-05-06 10:30:46 -04:00
connieshi
058dd0739d Add BadgeDrawable documentation. Update Bottom Navigation documentation to include information about badges.
PiperOrigin-RevId: 246309667
2019-05-03 10:57:40 -04:00
dniz
1e13013962 Update Dark theme documentation
PiperOrigin-RevId: 245964758
2019-04-30 12:53:11 -04:00
gauthams
71048025ef Update MaterialButton documentation to clarify usage of '.Icon' styles
PiperOrigin-RevId: 245317272
2019-04-29 15:52:46 -07:00
dniz
7b72c171ce Add documentation for Dark Theming and Elevation Overlays
PiperOrigin-RevId: 244658145
2019-04-22 15:36:14 -04:00
gauthams
64ad735c12 Add MaterialButtonToggleGroup docs
PiperOrigin-RevId: 243345601
2019-04-19 16:22:36 -04:00
afohrman
5d59ec05fc Update boxCornerRadius attributes in TextInputLayout's documentation to the correct names.
These attributes were renamed before our library was released as stable.

Resolves https://github.com/material-components/material-components-android/issues/312.

PiperOrigin-RevId: 241940785
2019-04-05 15:57:21 -04:00
gauthams
bc7a7e7961 Update MaterialButton documentation to include padding in clipToPadding snippet
PiperOrigin-RevId: 237881310
2019-03-22 16:04:38 -04:00
gauthams
916fd8760b Update MaterialButton documentation to include note about clipToPadding
PiperOrigin-RevId: 237537712
2019-03-22 15:57:41 -04:00
leticiars
eda47ac568 Updating TextInputLayout's documentation to include information about the end icon modes.
PiperOrigin-RevId: 237104993
2019-03-08 10:07:22 -05:00
gauthams
cbe25468bd Update ExtendedFloatingActionButton documentation
PiperOrigin-RevId: 235974516
2019-03-08 09:38:54 -05:00
gauthams
2f5c3143f1 Update ExtendedFloatingActionButton documentation
PiperOrigin-RevId: 235619027
2019-02-26 15:18:46 -05:00
marianomartin
88e2dd2f3c Update docs for MaterialCardView
PiperOrigin-RevId: 234983965
2019-02-24 14:27:22 -05:00
afohrman
beee015feb Use EditText's background for the filled text field and fix underline flakiness.
PiperOrigin-RevId: 231857938
2019-02-11 11:08:22 -08:00
afohrman
19039f7772 Automated g4 rollback of changelist 231246920
PiperOrigin-RevId: 231313735
2019-02-01 12:37:35 -05:00
afohrman
ef919e870a Use EditText's background for the filled text field and fix underline flakiness.
Use the EditText's background for the filled box text field and a MaterialShapeDrawable drawn to the canvas for the underline. This allows for many improvements to the filled text field.

This commit:
- Fixes the underline flakiness, where the underline used to not meet the edges until drawableStateChanged() was called after a layout pass (because TextInputLayout was attempting to use EditText's pre-existing underline, and the bounds of that Drawable weren't known in order to modify them until after drawableStateChanged())
- Removes the hard-coded box offset since it was only necessary when trying to use EditText's background drawable
- Brings the expanded label/hint a bit closer to the vertical center. Any more than this will require changing the bounds set on the expanded hint text and create misalignment between the expanded hint and any compound drawable that might be set

Specs: https://material.io/design/components/text-fields.html#spec

There is a possible alternative to drawing the underline manually: including the underline as part of the EditText's background. I investigated this option and rejected it, since it would require a re-architecture of the way TextInputLayout handles the box logic and many layers of box drawable nesting. It is much more straightforward and performant to draw the underline directly to the canvas than to convert the boxBackground to {LayerDrawable{MaterialShapeDrawable,{InsetDrawable{MaterialShapeDrawable}}}}.

This commit should only change the visuals of the filled text field; the outline text field should be visually untouched.

PiperOrigin-RevId: 231246920
2019-02-01 12:35:48 -05:00
gauthams
50d2d3c307 Update "Theme Attribute Mapping" section with opacities
PiperOrigin-RevId: 230631647
2019-01-25 14:01:07 -05:00
afohrman
0aa470af86 Support custom backgrounds for outline text fields and use EditText's background for the text field's outline.
The outline box styles previously didn't allow a custom drawable to be set. The box background was handled by TextInputLayout, which nulled out the EditText's background and drew the boxBackground directly to the canvas. That meant that a call to TextInputEditText#setBackground() would not actually do anything - it would result in the same outline text field.

In order to respect the background drawable, TextInputEditText's background is set to null in the style. Then, TextInputLayout programmatically sets the custom outline drawable if the background is already null. This avoids overwriting a drawable that may have already been set on the TextInputEditText.

This change does pretty much nothing to the filled box style; since the EditText's underline is still being used, the background of the EditText was never set to null for that style. This change should be a no-op for that style.

This move to using the EditText's background for the outline also improves the bounds of the outline text field and gets rid of the cutoff that was appearing at the top of the outline when TextInputLayout's hint was disabled and a hint was set on the EditText.

PiperOrigin-RevId: 230538561
2019-01-25 13:55:36 -05:00
Takao Chiba
d6db253586 [Docs] Fix table formatting for MaterialCardView
Resolves
https://github.com/material-components/material-components-android/pull/227

PiperOrigin-RevId: 229446278
2019-01-18 14:15:59 -05:00
ldjesper
5526e144aa Documentation updates for Dialog
PiperOrigin-RevId: 227530056
2019-01-10 15:54:56 -05:00