diff --git a/docs/components/Checkbox.md b/docs/components/Checkbox.md index 7d56d0b8b..c4025812e 100644 --- a/docs/components/Checkbox.md +++ b/docs/components/Checkbox.md @@ -37,8 +37,8 @@ page. _**Note:** `` is auto-inflated as `` via -`MaterialComponentsViewInflater` when using a non-Bridge -`Theme.MaterialComponents.*` theme._ +`MaterialComponentsViewInflater` when using a `Theme.Material3.*` +theme._ ### Making checkboxes accessible @@ -116,11 +116,11 @@ checkbox.setOnCheckedChangeListener { buttonView, isChecked Element | Attribute | Related method(s) | Default value -------------------------- | ------------------------------------------ | ---------------------------------------------------------- | ------------- **To use material colors** | `app:useMaterialThemeColors` | `setUseMaterialThemeColors`
`isUseMaterialThemeColors` | `true` (ignored if `app:buttonTint` is set) -**Color** | `app:buttonTint` | `setButtonTintList`
`getButtonTintList` | `null` +**Color** | `app:buttonTint` | `setButtonTintList`
`getButtonTintList` | `?attr/colorOnSurface` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/color/res/color/m3_selection_control_button_tint.xml)) **Min size** | `android:minWidth`
`android:minHeight` | `(set/get)MinWidth`
`(set/get)MinHeight` | `?attr/minTouchTargetSize` The color of the checkbox defaults to `?attr/colorOnSurface` (unchecked) and -`?attr/colorSecondary` (checked) defined in your app theme. If you want to +`?attr/colorPrimary` (checked) defined in your app theme. If you want to override this behavior, as you might with a custom drawable that should not be tinted, set `app:useMaterialThemeColors` to `false`: @@ -137,7 +137,7 @@ Element | Attribute | Related method(s) | -------------- | ------------------------ | ---------------------------------- | ------------- **Text label** | `android:text` | `setText`
`getText` | `null` **Color** | `android:textColor` | `setTextColor`
`getTextColors` | inherits from `AppCompatCheckBox` -**Typography** | `android:textAppearance` | `setTextAppearance` | inherits from `AppCompatCheckBox` +**Typography** | `android:textAppearance` | `setTextAppearance` | `?attr/textAppearanceBodyMedium` ### Checkbox states @@ -155,7 +155,7 @@ selected and unselected states are supported._ Element | Style ----------------- | --------------------------------------------------- -**Default style** | `Widget.MaterialComponents.CompoundButton.CheckBox` +**Default style** | `Widget.Material3.CompoundButton.CheckBox` Default style theme attribute: `?attr/checkboxStyle` @@ -189,7 +189,7 @@ Using theme attributes in `res/values/styles.xml` (themes all checkboxes and affects other components): ```xml - - @@ -219,7 +219,7 @@ checkboxes but does not affect other components): you can also change the checkbox colors via the `?attr/buttonTint` attribute: ```xml - ``` diff --git a/docs/components/assets/checkbox/checkbox_example.png b/docs/components/assets/checkbox/checkbox_example.png index a905d26e0..aad95f92c 100644 Binary files a/docs/components/assets/checkbox/checkbox_example.png and b/docs/components/assets/checkbox/checkbox_example.png differ diff --git a/lib/java/com/google/android/material/checkbox/res-public/values/public.xml b/lib/java/com/google/android/material/checkbox/res-public/values/public.xml new file mode 100644 index 000000000..e3913feb7 --- /dev/null +++ b/lib/java/com/google/android/material/checkbox/res-public/values/public.xml @@ -0,0 +1,21 @@ + + + + + + +