@@ -10,26 +10,13 @@ path: /catalog/dividers/
1010# Dividers
1111
1212[ Dividers] ( https://m3.material.io/components/divider/overview ) are thin lines
13- that group content in lists or other containers. There are two variants of
14- dividers.
15-
16- <table >
17- <tr >
18- <td ><img src =" assets/dividers/divider_fullwidth.png " alt =" divider with full width " ></td >
19- <td ><img src =" assets/dividers/divider_inset.png " alt =" Inset " ></td >
20- </tr >
21- <tr >
22- <td style =" text-align : center ;" >Full-width</td >
23- <td style =" text-align : center ;" >Inset</td >
24- </tr >
25- </table >
13+ that group content in lists or other containers. Dividers are one way to
14+ visually group components and create hierarchy. They can also be used to imply
15+ nested parent/child relationships.
2616
27- ** Note: ** Images use various dynamic color schemes.
17+ ![ Divider with full width ] ( assets/dividers/divider_fullwidth.png )
2818
29- Before you can use Material dividers, you need to add a dependency to the
30- Material components for Android library. For more information, go to the
31- [ Getting started] ( https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md )
32- page.
19+ ** Note:** Images use various dynamic color schemes.
3320
3421## Design & API documentation
3522
4027
4128![ Anatomy of a divider] ( assets/dividers/divider_anatomy.png )
4229
43- 1 . Divider
30+ 1 . Divider
4431
45- More details on anatomy items in the [ component guidelines] ( https://m3.material.io/components/divider/guidelines#b56e93b4-b56d-4e12-bd9f-68ce55132cc4 ) .
32+ More details on anatomy items in the
33+ [ component guidelines] ( https://m3.material.io/components/divider/guidelines#b56e93b4-b56d-4e12-bd9f-68ce55132cc4 ) .
4634
4735## Key properties
4836
@@ -58,20 +46,47 @@ Element | Attribute | Related method(s)
5846
5947### Styles
6048
61- Element | Style
62- ----------------- | -------------------------------------------
63- ** Default style** | ` Widget.Material3.MaterialDivider `
64-
65- Default style theme attribute: ` ?attr/materialDividerStyle `
49+ Element | Style | Theme attribute
50+ ----------------- | ---------------------------------- | ---------------
51+ ** Default style** | ` Widget.Material3.MaterialDivider ` | ` ?attr/materialDividerStyle `
6652
6753For the full list, see
6854[ styles] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/divider/res/values/styles.xml )
6955and
7056[ attrs] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/divider/res/values/attrs.xml ) .
7157
58+ ## Types of divider
59+
60+ There are two types of dividers:
61+
62+ * Full width
63+ * Inset
64+
65+ ### Full width divider
66+
67+ <img src =" assets/dividers/divider_full_width_type.png " alt =" Full width divider " height =" 350 " >
68+ Full width dividers to indicate separation of content
69+
70+ Full width dividers separate larger sections of unrelated content. They also
71+ separate interactive areas from non-interactive areas. They can be used directly
72+ on a surface or inside other components like cards or lists.
73+
74+ ### Inset divider
75+
76+ <img src =" assets/dividers/divider_inset.png " alt =" Inset divider " height =" 400 " >
77+ Inset divider to indicate separation of content
78+
79+ Inset dividers separate related content within a section. They are equally
80+ indented from both sides of the screen by default.
81+
7282## Code implementation
7383
74- ### ` MaterialDivider `
84+ Before you can use Material dividers, you need to add a dependency to the
85+ Material components for Android library. For more information, go to the
86+ [ Getting started] ( https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md )
87+ page.
88+
89+ ### Adding ` MaterialDivider `
7590
7691API and source code:
7792
@@ -114,7 +129,8 @@ Or in code:
114129divider.setDividerInsetStart(insetStart)
115130divider.setDividerInsetEnd(insetEnd)
116131```
117- ### ` MaterialDividerItemDecoration `
132+
133+ ### Adding ` MaterialDividerItemDecoration `
118134
119135API and source code:
120136
@@ -159,7 +175,7 @@ In code:
159175divider.setLastItemDecorated(false )
160176```
161177
162- ## Making dividers accessible
178+ ### Making dividers accessible
163179
164180The divider is a decorative element. There are no special accessibility
165181precautions for the divider.
0 commit comments