Skip to content

Commit 1785bbf

Browse files
imhappipaulfthomas
authored andcommitted
[Docs] Cross-reference m.io and DAC in Github docs
PiperOrigin-RevId: 546035020
1 parent 9f2e686 commit 1785bbf

28 files changed

+277
-217
lines changed

docs/components/BadgeDrawable.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ path: /catalog/badging/
99

1010
# `BadgeDrawable`
1111

12+
## Design & API Documentation
13+
14+
* [Google Material3 Spec](https://material.io/components/badges/overview)
15+
* [API reference](https://developer.android.com/reference/com/google/android/material/badge/package-summary)
16+
1217
## Using badges
1318

1419
Badge | Badge with number | Badge with a maximum character count
@@ -23,13 +28,16 @@ A `BadgeDrawable` represents dynamic information such as a number of pending
2328
requests in a [`BottomNavigationView`](BottomNavigation.md) or
2429
[`TabLayout`](Tabs.md).
2530

26-
## Design & API Documentation
31+
## Usage
2732

28-
- [Material Design guidelines: Bottom Navigation](https://material.io/design/components/bottom-navigation.html#behavior)
29-
- [Class definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/badge/BadgeDrawable.java)
30-
- [Class overview](https://developer.android.com/reference/com/google/android/material/badge/BadgeDrawable)
33+
API and source code:
3134

32-
## Usage
35+
* `BadgeDrawable`
36+
* [Class definition](https://developer.android.com/reference/com/google/android/material/badge/BadgeDrawable)
37+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/badge/BadgeDrawable.java)
38+
* `BadgeUtils`
39+
* [Class definition](https://developer.android.com/reference/com/google/android/material/badge/BadgeUtils)
40+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/badge/BadgeUtils.java)
3341

3442
Create an instance of `BadgeDrawable` by calling `create(Context)` or
3543
`createFromAttributes(Context, AttributeSet, int, int)}`.

docs/components/BottomAppBar.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ revert back to the previous style.
2020

2121
**Contents**
2222

23+
* [Design & API documentation](#design-api-documentation)
2324
* [Using bottom app bars](#using-bottom-app-bars)
2425
* [Bottom app bar](#bottom-app-bar)
2526
* [Theming bottom app bars](#theming-bottom-app-bars)
2627

28+
## Design & API Documentation
29+
30+
* [Google Material3 Spec](https://material.io/components/bottom-app-bar/overview)
31+
* [API Reference](https://developer.android.com/reference/com/google/android/material/bottomappbar/package-summary)
32+
2733
## Using bottom app bars
2834

2935
Before you can use Material bottom app bars, you need to add a dependency to the

docs/components/BottomNavigation.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ allow movement between primary destinations in an app.
1616

1717
**Contents**
1818

19+
* [Design & API documentation](#design-api-documentation)
1920
* [Using bottom navigation](#using-bottom-navigation)
2021
* [Bottom navigation bar](#bottom-navigation-bar)
2122
* [Theming](#theming-a-bottom-navigation-bar)
2223

24+
## Design & API Documentation
25+
26+
* [Google Material3 Spec](https://material.io/components/navigation-bar/overview)
27+
* [API Reference](https://developer.android.com/reference/com/google/android/material/bottomnavigation/package-summary)
28+
2329
## Using bottom navigation
2430

2531
Before you can use the Material bottom navigation, you need to add a dependency
@@ -267,8 +273,8 @@ The following is an anatomy diagram for the bottom navigation bar:
267273
**Element** | **Attribute** | **Related methods** | **Default value**
268274
------------------------- | ------------------------- | ----------------------------------------------------- | -----------------
269275
**Menu resource** | `app:menu` | `inflateMenu`<br/>`getMenu` | N/A
270-
**Ripple (inactive)** | `app:itemRippleColor` | `setItemRippleColor`<br/>`getItemRippleColor` | Variations of `?attr/colorPrimary` and `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_ripple_color_selector.xml))
271-
**Ripple (active)** | " | " | Variations of `?attr/colorPrimary` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_ripple_color_selector.xml))
276+
**Ripple (inactive)** | `app:itemRippleColor` | `setItemRippleColor`<br/>`getItemRippleColor` | Variations of `?attr/colorPrimary` and `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_ripple_color_selector.xml))
277+
**Ripple (active)** | " | " | Variations of `?attr/colorPrimary` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_ripple_color_selector.xml))
272278
**Label visibility mode** | `app:labelVisibilityMode` | `setLabelVisibilityMode`<br/>`getLabelVisibilityMode` | `LABEL_VISIBILITY_AUTO`
273279

274280
#### Icon attributes
@@ -277,19 +283,19 @@ The following is an anatomy diagram for the bottom navigation bar:
277283
-------------------- | ------------------------------------- | ---------------------------------------------------------------- | -----------------
278284
**Icon** | `android:icon` in the `menu` resource | N/A | N/A
279285
**Size** | `app:itemIconSize` | `setItemIconSize`<br/>`setItemIconSizeRes`<br/>`getItemIconSize` | `24dp`
280-
**Color (inactive)** | `app:itemIconTint` | `setItemIconTintList`<br/>`getItemIconTintList` | `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml))
281-
**Color (active)** | " | " | `?attr/colorOnSecondaryContainer` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml))
286+
**Color (inactive)** | `app:itemIconTint` | `setItemIconTintList`<br/>`getItemIconTintList` | `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml))
287+
**Color (active)** | " | " | `?attr/colorOnSecondaryContainer` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml))
282288

283289
#### Text label attributes
284290

285-
| **Element** | **Attribute** | **Related methods** | **Default value** |
286-
|---------------------------|-------------------------------------------|---------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
287-
| **Text label** | `android:title` in the `menu` resource | N/A | N/A |
288-
| **Color (inactive)** | `app:itemTextColor` | `setItemTextColor`<br/>`getItemTextColor` | `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml)) |
289-
| **Color (active)** | " | " | `?attr/colorOnSurface` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml)) |
290-
| **Typography (inactive)** | `app:itemTextAppearanceInactive` | `setItemTextAppearanceInactive`<br/>`getItemTextAppearanceInactive` | `?attr/textAppearanceTitleSmall` |
291-
| **Typography (active)** | `app:itemTextAppearanceActive` | `setItemTextAppearanceActive`<br/>`getItemTextAppearanceActive` | `?attr/textAppearanceTitleSmall` |
292-
| **Typography (active)** | `app:itemTextAppearanceActiveBoldEnabled` | `setItemTextAppearanceActiveBoldEnabled` | `true` |
291+
**Element** | **Attribute** | **Related methods** | **Default value**
292+
------------------------- | ----------------------------------------- | ------------------------------------------------------------------- | -----------------
293+
**Text label** | `android:title` in the `menu` resource | N/A | N/A
294+
**Color (inactive)** | `app:itemTextColor` | `setItemTextColor`<br/>`getItemTextColor` | `?attr/colorOnSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml))
295+
**Color (active)** | " | " | `?attr/colorOnSurface` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml))
296+
**Typography (inactive)** | `app:itemTextAppearanceInactive` | `setItemTextAppearanceInactive`<br/>`getItemTextAppearanceInactive` | `?attr/textAppearanceTitleSmall`
297+
**Typography (active)** | `app:itemTextAppearanceActive` | `setItemTextAppearanceActive`<br/>`getItemTextAppearanceActive` | `?attr/textAppearanceTitleSmall`
298+
**Typography (active)** | `app:itemTextAppearanceActiveBoldEnabled` | `setItemTextAppearanceActiveBoldEnabled` | `true`
293299

294300
#### Styles
295301

docs/components/BottomSheet.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ containing supplementary content that are anchored to the bottom of the screen.
1616

1717
**Contents**
1818

19+
* [Design & API Documentation](#design-api-documentation)
1920
* [Using bottom sheets](#using-bottom-sheets)
2021
* [Standard bottom sheet](#standard-bottom-sheet)
2122
* [Modal bottom sheet](#modal-bottom-sheet)
2223
* [Anatomy and key properties](#anatomy-and-key-properties)
2324
* [Predictive Back](#predictive-back)
2425
* [Theming](#theming-bottom-sheets)
2526

27+
## Design & API Documentation
28+
29+
* [Google Material3 Spec](https://material.io/components/bottom-sheets/overview)
30+
* [API Reference](https://developer.android.com/reference/com/google/android/material/bottomsheet/package-summary)
31+
2632
## Using bottom sheets
2733

2834
Before you can use Material bottom sheets, you need to add a dependency to the
@@ -246,7 +252,8 @@ simultaneously viewing and interacting with both regions. They are commonly used
246252
to keep a feature or secondary content visible on screen when content in the
247253
main UI region is frequently scrolled or panned.
248254

249-
`BottomSheetBehavior` is applied to a child of
255+
[`BottomSheetBehavior`](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetBehavior)
256+
is applied to a child of
250257
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout)
251258
to make that child a **persistent bottom sheet**, which is a view that comes up
252259
from the bottom of the screen, elevated over the main content. It can be dragged
@@ -341,9 +348,9 @@ rest of the screen. They are an alternative to inline menus and simple dialogs
341348
on mobile devices, providing additional room for content, iconography, and
342349
actions.
343350

344-
`BottomSheetDialogFragment` is a thin layer on top of the regular support
345-
library Fragment that renders your fragment as a **modal bottom sheet**,
346-
fundamentally acting as a dialog.
351+
[`BottomSheetDialogFragment`](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment)
352+
is a thin layer on top of the regular support library Fragment that renders your
353+
fragment as a **modal bottom sheet**, fundamentally acting as a dialog.
347354

348355
Modal bottom sheets render a shadow on the content below them, to indicate that
349356
they are modal. If the content outside of the dialog is tapped, the bottom sheet

docs/components/Button.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and make choices, with a single tap.
1616

1717
**Contents**
1818

19+
* [Design & API Documentation](#design-api-documentation)
1920
* [Using buttons](#using-buttons)
2021
* [Elevated button](#elevated-button)
2122
* [Filled button](#filled-button)
@@ -26,6 +27,11 @@ and make choices, with a single tap.
2627
* [Icon button](#icon-button)
2728
* [Theming](#theming-buttons)
2829

30+
## Design & API Documentation
31+
32+
* [Google Material3 Spec](https://material.io/components/buttons/overview)
33+
* [API Reference](https://developer.android.com/reference/com/google/android/material/button/package-summary)
34+
2935
## Using buttons
3036

3137
Before you can use Material buttons, you need to add a dependency to the

docs/components/Card.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ a single subject.
1616

1717
**Contents**
1818

19+
* [Design & API Documentation](#design-api-documentation)
1920
* [Using cards](#using-cards)
2021
* [Card](#card)
2122
* [Theming](#theming-cards)
2223

24+
## Design & API Documentation
25+
26+
* [Google Material3 Spec](https://material.io/components/cards/overview)
27+
* [API reference](https://developer.android.com/reference/com/google/android/material/card/package-summary)
28+
2329
## Using cards
2430

2531
Before you can use a Material card, you need to add a dependency to the Material

docs/components/Carousel.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,32 @@ Carousels contain a collection of items that can move into or out of view
1515

1616
**Contents**
1717

18+
* [Design & API documentation](#design-api-documentation)
1819
* [Using carousel](#using-carousel)
1920
* [Multi-browse carousels](#multi-browse-carousels)
2021
* [Customizing carousel](#customizing-carousel)
2122

23+
## Design & API Documentation
24+
25+
* [Google Material3 Spec](https://material.io/components/carousel/overview)
26+
* [API reference](https://developer.android.com/reference/com/google/android/material/carousel/package-summary)
27+
2228
## Using carousel
2329

30+
API and source code:
31+
32+
* `RecyclerView`
33+
* [Class definition](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView)
34+
* `CarouselLayoutManager`
35+
* [Class definition](https://developer.android.com/reference/com/google/android/material/carousel/CarouselLayoutManager)
36+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/carousel/CarouselLayoutManager.java)
37+
* `CarouselStrategy`
38+
* [Class definition](https://developer.android.com/reference/com/google/android/material/carousel/CarouselStrategy)
39+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/carousel/CarouselStrategy.java)
40+
* `MaskableFrameLayout`
41+
* [Class definition](https://developer.android.com/reference/com/google/android/material/carousel/MaskableFrameLayout)
42+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/carousel/MaskableFrameLayout.java)
43+
2444
Before you can use Material carousels, you need to add a dependency on the
2545
Material Components for Android library. For more information, go to the
2646
[Getting started](https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md)
@@ -76,6 +96,12 @@ on which carousel strategy you are using; you can have a
7696

7797
![A contained, multi-browse Carousel](assets/carousel/multibrowse.png)
7898

99+
API and source code:
100+
101+
* `MultiBrowseCarouselStrategy`
102+
* [Class definition](https://developer.android.com/reference/com/google/android/material/carousel/MultiBrowseCarouselStrategy)
103+
* [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/carousel/MultiBrowseCarouselStrategy.java)
104+
79105
A multi-browse strategy allows quick browsing of many small items, like a photo
80106
thumbnail gallery. A start-aligned, multi-browse strategy is the default
81107
strategy for the carousel.
@@ -130,7 +156,11 @@ The main means of changing the look of carousel is by setting the height of your
130156

131157
### Reacting to changes in item mask size
132158

133-
If your `RecyclerView`'s item layout contains text or other content that needs to react to changes in the item's mask, you can listen for changes in mask size by setting an `onMaskChangedListener` on your `MaskableFrameLayout` inside your `RecyclerView.ViewHolder`.
159+
If your `RecyclerView`'s item layout contains text or other content that needs
160+
to react to changes in the item's mask, you can listen for changes in mask size
161+
by setting an
162+
[`onMaskChangedListener`](https://developer.android.com/reference/com/google/android/material/carousel/OnMaskChangedListener)
163+
on your `MaskableFrameLayout` inside your `RecyclerView.ViewHolder`.
134164

135165
```kotlin
136166
(viewHolder.itemView as MaskableFrameLayout).setOnMaskChangedListener(

docs/components/Checkbox.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ checked](assets/checkbox/checkbox_hero.png)
2424

2525
**Contents**
2626

27+
* [Design & API Documentation](#design-api-documentation)
2728
* [Using checkboxes](#using-checkboxes)
2829
* [Checkbox](#checkbox)
2930
* [Theming checkboxes](#theming-checkboxes)
3031

32+
## Design & API Documentation
33+
34+
* [Google Material3 Spec](https://material.io/components/checkbox/overview)
35+
* [API reference](https://developer.android.com/reference/com/google/android/material/checkbox/package-summary)
36+
3137
## Using checkboxes
3238

3339
Before you can use Material checkboxes, you need to add a dependency to the

0 commit comments

Comments
 (0)