Skip to content

Commit 84533b9

Browse files
Material Design Teamhunterstich
authored andcommitted
[Docs] Updated Lists doc to make it more user friendly
PiperOrigin-RevId: 777422520
1 parent dbcc183 commit 84533b9

File tree

5 files changed

+49
-12
lines changed

5 files changed

+49
-12
lines changed

docs/components/List.md

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,76 @@
11
<!--docs:
2-
title: "List"
2+
title: "Lists"
33
layout: detail
44
section: components
55
excerpt: "Lists are continuous, vertical indexes of text or images."
66
iconId: list
77
path: /catalog/lists/
88
-->
99

10-
# List
10+
# Lists
1111

12-
Lists are continuous, vertical indexes of text or images.
12+
[Lists](https://m3.material.io/components/lists) are continuous, vertical
13+
indexes of text or images.
1314

14-
**Design**
15+
![Different types of list items](assets/lists/list_hero.png) List items can have
16+
supporting text and values
1517

16-
[Material Design guidelines: Lists](https://material.io/go/design-lists)
18+
**Note:** Images use various dynamic color schemes.
1719

18-
**Single-line list**
20+
## Design & API documentation
1921

20-
Single-line list items contain a maximum of one line of text.
22+
* [Material 3 (M3) spec](https://m3.material.io/components/lists/overview/)
23+
* [API reference](https://developer.android.com/reference/com/google/android/material/lists/package-summary)
2124

22-
**Two-line list**
25+
## Anatomy
2326

24-
Two-line list items contain a maximum of two lines of text.
27+
![Anatomy of a list](assets/lists/lists_anatomy.png)
2528

26-
**Three-line list**
29+
1. Leading video thumbnail (optional)
30+
2. Container
31+
3. Headline
32+
4. Supporting text (optional)
33+
5. Trailing supporting text (optional)
34+
6. Leading icon (optional)
35+
7. Leading avatar label text (optional)
36+
8. Trailing icon (optional)
37+
9. Leading avatar container (optional)
38+
10. Divider (optional)
2739

28-
Three-line list items contains a maximum of three lines of text.
40+
More details on anatomy items in the
41+
[component guidelines](https://m3.material.io/components/lists/guidelines#30e9b982-6d57-4163-8514-83761650db9f).
42+
43+
## Sizes of list items
44+
45+
List items come in three sizes:
46+
47+
![Three sizes of list items](assets/lists/lists_sizes.png)
48+
49+
1. **One-line list** items contain a maximum of one line of text.
50+
2. **Two-line list** items contain a maximum of two lines of text.
51+
3. **Three-line list** items contains a maximum of three lines of text.
2952

3053
## Demo
3154

3255
Lists are under development. You can see the current version of the
3356
[Lists Demo](https://github.com/material-components/material-components-android/tree/master/catalog/java/io/material/catalog/lists/)
3457
in the Material Android Catalog.
3558

36-
## Code
59+
## Code implementation
60+
61+
Before you can use Material lists, you need to add a dependency to the Material
62+
Components for Android library. For more information, go to the
63+
[Getting started](https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md)
64+
page.
65+
66+
![Example of a list](assets/lists/lists_hero.png)
67+
68+
* Use lists to help users find a specific item and act on it
69+
* Order list items in logical ways (like alphabetical or numerical)
70+
* Keep items short and easy to scan
71+
* Show icons, text, and actions in a consistent format
72+
73+
### Adding list
3774

3875
The
3976
[Lists Package](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/lists)
24.2 KB
Loading
55.1 KB
Loading
24.2 KB
Loading
60.5 KB
Loading

0 commit comments

Comments
 (0)