Skip to content

Commit 522c9dc

Browse files
manabu-nakamurapekingme
authored andcommitted
[Documentation] Update shape references in TextField.md and Card.md.
Resolves #4475 Resolves #4480 GIT_ORIGIN_REV_ID=798574d72daa041cca177015c5510e8ae2e2a59e PiperOrigin-RevId: 717879277
1 parent 690bbfc commit 522c9dc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

docs/components/Card.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Element | Attribute | Related method(s)
371371
**Foreground color** | `app:cardForegroundColor` | `setCardForegroundColor`<br/>`getCardForegroundColor` | `@android:color/transparent` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/card/res/color/m3_card_foreground_color.xml))
372372
**Stroke color** | `app:strokeColor` | `setStrokeColor`<br/>`getStrokeColor`<br/>`getStrokeColorStateList` | `?attr/colorOutline` (unchecked)<br/>`?attr/colorSecondary` (checked)
373373
**Stroke width** | `app:strokeWidth` | `setStrokeWidth`<br/>`getStrokeWidth` | `1dp` (outlined style)<br/>`0dp` (elevated or filled style)
374-
**Shape** | `app:shapeAppearance` | `setShapeAppearanceModel`<br/>`getShapeAppearanceModel` | `?attr/shapeAppearanceMediumComponent`
374+
**Shape** | `app:shapeAppearance` | `setShapeAppearanceModel`<br/>`getShapeAppearanceModel` | `?attr/shapeAppearanceCornerMedium`
375375
**Elevation** | `app:cardElevation` | `setCardElevation`<br/>`setCardMaxElevation` | `0dp` (outlined or filled style)<br/>`1dp` (elevated style)
376376
**Ripple color** | `app:rippleColor` | `setRippleColor`<br/>`setRippleColorResource`<br/>`getRippleColor` | `?attr/colorOnSurfaceVariant` at 20% opacity (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/card/res/color/m3_card_ripple_color.xml))
377377

@@ -451,10 +451,10 @@ to all cards. This will affect other components:
451451
<item name="colorSecondary">@color/shrine_pink_100</item>
452452
<item name="colorSurface">@color/shrine_pink_light</item>
453453
<item name="colorOnSurfaceVariant">@color/shrine_pink_900</item>
454-
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.MediumComponent</item>
454+
<item name="shapeAppearanceCornerMedium">@style/ShapeAppearance.App.Corner.Medium</item>
455455
</style>
456456

457-
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.Material3.MediumComponent">
457+
<style name="ShapeAppearance.App.Corner.Medium" parent="ShapeAppearance.Material3.Corner.Medium">
458458
<item name="cornerFamily">cut</item>
459459
<item name="cornerSize">8dp</item>
460460
</style>
@@ -471,7 +471,7 @@ theme to all cards but does not affect other components:
471471

472472
<style name="Widget.App.CardView" parent="Widget.Material3.CardView.Elevated">
473473
<item name="materialThemeOverlay">@style/ThemeOverlay.App.Card</item>
474-
<item name="shapeAppearance">@style/ShapeAppearance.App.MediumComponent</item>
474+
<item name="shapeAppearance">@style/ShapeAppearance.App.Corner.Medium</item>
475475
</style>
476476

477477
<style name="ThemeOverlay.App.Card" parent="">
@@ -506,7 +506,7 @@ In the layout:
506506
<!-- Media -->
507507
<com.google.android.material.imageview.ShapeableImageView
508508
...
509-
app:shapeAppearance="?attr/shapeAppearanceMediumComponent"
509+
app:shapeAppearance="?attr/shapeAppearanceCornerMedium"
510510
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.Card.Media"
511511
/>
512512

docs/components/TextField.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ indicator, optional helper/error text and optional leading/trailing icons.
463463
Element | Attribute | Related method(s) | Default value
464464
---------------------- | ------------------------ | --------------------------------------------------------------------------------------- | -------------
465465
**Color** | `app:boxBackgroundColor` | `setBoxBackgroundColor`<br/>`setBoxBackgroundColorResource`<br/>`getBoxBackgroundColor` | `?attr/colorSurfaceContainerHighest` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/textfield/res/color/m3_textfield_filled_background_color.xml))
466-
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceSmallComponent`
466+
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceCornerExtraSmall`
467467
**Text field enabled** | `android:enabled` | `setEnabled` | `true`
468468

469469
#### Leading icon attributes
@@ -643,7 +643,7 @@ Element | Attribute | Related method(s)
643643
**Stroke error color** | `app:boxStrokeErrorColor` | `setBoxStrokeErrorColor`<br/>`getBoxStrokeErrorColor` | `?attr/colorError`
644644
**Stroke width** | `app:boxStrokeWidth` | N/A | `1dp`
645645
**Stroke focused width** | `app:boxStrokeWidthFocused` | N/A | `2dp`
646-
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceSmallComponent`
646+
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceCornerExtraSmall`
647647
**Text field enabled** | `android:enabled` | `setEnabled` | `true`
648648

649649
#### Leading icon attributes
@@ -777,7 +777,7 @@ text fields and affects other components:
777777
<item name="colorError">@color/shrine_red</item>
778778
<item name="textAppearanceTitleMedium">@style/TextAppearance.App.TitleMedium</item>
779779
<item name="textAppearanceBodySmall">@style/TextAppearance.App.BodySmall</item>
780-
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.App.SmallComponent</item>
780+
<item name="shapeAppearanceCornerExtraSmall">@style/ShapeAppearance.App.Corner.ExtraSmall</item>
781781
</style>
782782

783783
<style name="TextAppearance.App.TitleMedium" parent="TextAppearance.Material3.TitleMedium">
@@ -790,7 +790,7 @@ text fields and affects other components:
790790
<item name="android:fontFamily">@font/rubik</item>
791791
</style>
792792

793-
<style name="ShapeAppearance.App.SmallComponent" parent="ShapeAppearance.Material3.SmallComponent">
793+
<style name="ShapeAppearance.App.Corner.ExtraSmall" parent="ShapeAppearance.Material3.Corner.ExtraSmall">
794794
<item name="cornerFamily">cut</item>
795795
<item name="cornerSize">4dp</item>
796796
</style>
@@ -807,7 +807,7 @@ all text fields but does not affect other components:
807807

808808
<style name="Widget.App.TextInputLayout" parent="Widget.Material3.TextInputLayout.*">
809809
<item name="materialThemeOverlay">@style/ThemeOverlay.App.TextInputLayout</item>
810-
<item name="shapeAppearance">@style/ShapeAppearance.App.SmallComponent</item>
810+
<item name="shapeAppearance">@style/ShapeAppearance.App.Corner.ExtraSmall</item>
811811
<item name="hintTextColor">?attr/colorOnSurface</item>
812812
</style>
813813

0 commit comments

Comments
 (0)