Skip to content

Commit 8f11252

Browse files
leticiarossikendrickumstattd
authored andcommitted
[Docs][OverflowLinearLayout] Doc updates
PiperOrigin-RevId: 759660025
1 parent b92bc51 commit 8f11252

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

docs/components/DockedToolbar.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Here's what a typical layout would look like:
7373
<FrameLayout
7474
android:layout_width="0dp"
7575
android:layout_height="wrap_content"
76+
android:minWidth="48dp"
7677
android:layout_weight="1"
7778
app:layout_overflowText="@string/docked_toolbar_back_button_description"
7879
app:layout_overflowIcon="@drawable/ic_arrow_back_24px">
@@ -89,6 +90,7 @@ Here's what a typical layout would look like:
8990
<FrameLayout
9091
android:layout_width="0dp"
9192
android:layout_height="wrap_content"
93+
android:minWidth="48dp"
9294
android:layout_weight="1"
9395
app:layout_overflowText="@string/docked_toolbar_add_button_description"
9496
app:layout_overflowIcon="@drawable/ic_add_24px">
@@ -105,6 +107,7 @@ Here's what a typical layout would look like:
105107
<FrameLayout
106108
android:layout_width="0dp"
107109
android:layout_height="wrap_content"
110+
android:minWidth="48dp"
108111
android:layout_weight="1"
109112
app:layout_overflowText="@string/docked_toolbar_forward_button_description"
110113
app:layout_overflowIcon="@drawable/ic_arrow_forward_24px">
@@ -130,8 +133,8 @@ automatically adding items to an overflow menu when there's not enough screen
130133
space to show all the items.
131134

132135
When using `OverflowLinearLayout`, you should also set `app:layout_overflowText`
133-
on each child that will show as the text of the menu item that corresponds to
134-
the hidden child. Optionally, you can also set `app:layout_overflowIcon`. See
136+
on each child as that will be the text of the menu item that corresponds to the
137+
hidden child. Optionally, you can also set `app:layout_overflowIcon`. See
135138
[OverflowLinearLayout](https://github.com/material-components/material-components-android/tree/master//docs/components/Overflow.md)
136139
for more info.
137140

docs/components/FloatingToolbar.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Here's what a typical layout would look like:
7171
android:layout_margin="16dp">
7272

7373
<!-- floating toolbar sample content -->
74-
<LinearLayout
74+
<com.google.android.material.overflow.OverflowLinearLayout
7575
android:id="@+id/floating_toolbar_child"
7676
android:layout_width="wrap_content"
7777
android:layout_height="wrap_content"
@@ -85,7 +85,9 @@ Here's what a typical layout would look like:
8585
android:layout_height="wrap_content"
8686
android:checkable="true"
8787
android:contentDescription="@string/bold_button_content_description"
88-
app:icon="@drawable/ic_format_bold_24px" />
88+
app:icon="@drawable/ic_format_bold_24px"
89+
app:layout_overflowText="@string/bold_button"
90+
app:layout_overflowIcon="@drawable/ic_format_bold_24px" />
8991

9092
<Button
9193
android:id="@+id/floating_toolbar_button_italic"
@@ -94,7 +96,9 @@ Here's what a typical layout would look like:
9496
android:layout_height="wrap_content"
9597
android:checkable="true"
9698
android:contentDescription="@string/italic_button_content_description"
97-
app:icon="@drawable/ic_format_italic_24px" />
99+
app:icon="@drawable/ic_format_italic_24px"
100+
app:layout_overflowText="@string/italic_button"
101+
app:layout_overflowIcon="@drawable/ic_format_italic_24px" />
98102

99103
<Button
100104
android:id="@+id/floating_toolbar_button_underlined"
@@ -103,8 +107,10 @@ Here's what a typical layout would look like:
103107
android:layout_height="wrap_content"
104108
android:checkable="true"
105109
android:contentDescription="@string/underlined_button_content_description"
106-
app:icon="@drawable/ic_format_underlined_24px" />
107-
</LinearLayout>
110+
app:icon="@drawable/ic_format_underlined_24px"
111+
app:layout_overflowText="@string/underlined_button"
112+
app:layout_overflowIcon="@drawable/ic_format_underlined_24px" />
113+
</com.google.android.material.overflow.OverflowLinearLayout>
108114

109115
</com.google.android.material.floatingtoolbar.FloatingToolbarLayout>
110116
```
@@ -117,8 +123,8 @@ automatically adding items to an overflow button when there's not enough screen
117123
space to show all the items.
118124

119125
When using `OverflowLinearLayout`, you should also set `app:layout_overflowText`
120-
on each child that will show as the text of the menu item that corresponds to
121-
the hidden child. Optionally, you can also set `app:layout_overflowIcon`. See
126+
as that will be the text of the menu item that corresponds to the hidden child.
127+
Optionally, you can also set `app:layout_overflowIcon`. See
122128
[OverflowLinearLayout](https://github.com/material-components/material-components-android/tree/master//docs/components/Overflow.md)
123129
for more info.
124130

0 commit comments

Comments
 (0)