|
1 | 1 | <!--docs: |
2 | | -title: "List" |
| 2 | +title: "Lists" |
3 | 3 | layout: detail |
4 | 4 | section: components |
5 | 5 | excerpt: "Lists are continuous, vertical indexes of text or images." |
6 | 6 | iconId: list |
7 | 7 | path: /catalog/lists/ |
8 | 8 | --> |
9 | 9 |
|
10 | | -# List |
| 10 | +# Lists |
11 | 11 |
|
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. |
13 | 14 |
|
14 | | -**Design** |
| 15 | + List items can have |
| 16 | +supporting text and values |
15 | 17 |
|
16 | | -[Material Design guidelines: Lists](https://material.io/go/design-lists) |
| 18 | +**Note:** Images use various dynamic color schemes. |
17 | 19 |
|
18 | | -**Single-line list** |
| 20 | +## Design & API documentation |
19 | 21 |
|
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) |
21 | 24 |
|
22 | | -**Two-line list** |
| 25 | +## Anatomy |
23 | 26 |
|
24 | | -Two-line list items contain a maximum of two lines of text. |
| 27 | + |
25 | 28 |
|
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) |
27 | 39 |
|
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 | + |
| 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. |
29 | 52 |
|
30 | 53 | ## Demo |
31 | 54 |
|
32 | 55 | Lists are under development. You can see the current version of the |
33 | 56 | [Lists Demo](https://github.com/material-components/material-components-android/tree/master/catalog/java/io/material/catalog/lists/) |
34 | 57 | in the Material Android Catalog. |
35 | 58 |
|
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 | + |
| 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 |
37 | 74 |
|
38 | 75 | The |
39 | 76 | [Lists Package](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/lists) |
|
0 commit comments