You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/OverflowLinearLayout.md
+62-52Lines changed: 62 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,16 @@
1
-
# Overflow Linear Layout
2
-
3
-
The `OverflowLinearLayout` is usually used with the [FloatingToolbar](https://github.com/material-components/material-components-android/tree/master//docs/components/FloatingToolbar.md)
4
-
and the [DockedToolbar](https://github.com/material-components/material-components-android/tree/master//docs/components/DockedToolbar.md).
1
+
<!--docs:
2
+
title: "Overflow linear layout"
3
+
layout: detail
4
+
section: components
5
+
excerpt: "The overflow linear layout is usually used with the FloatingToolbar and DockedToolbar."
6
+
iconId: overflow
7
+
path: /catalog/overflow-linear-layout/
8
+
-->
9
+
10
+
# Overflow linear layout
11
+
12
+
The `OverflowLinearLayout` is usually used with the
13
+
[floatingtoolbar](FloatingToolbar.md) and the [dockedtoolbar](DockedToolbar.md).
5
14
It allows for its children to be automatically hidden/shown depending on its
6
15
parent's max size. The hidden children are put in an overflow menu, and an
7
16
overflow button is added as the last child of its parent layout.
@@ -11,7 +20,43 @@ decisions, you'll need to add/remove the desired view(s), instead of changing
11
20
their visibility, as the `OverflowLinearLayout` will determine the final
12
21
visibility value of its children.
13
22
14
-
## Using Overflow Linear Layout
23
+
## Key properties
24
+
25
+
### `OverflowLinearLayout` attributes
26
+
27
+
Element | Attribute | Related methods | Default value
[overflow linear layout attributes](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/overflow/res/values/attrs.xml)
56
+
57
+
## Code implementation
58
+
59
+
### Adding overflow linear layout
15
60
16
61
A common usage looks like:
17
62
@@ -36,64 +81,29 @@ When using `OverflowLinearLayout`, you should set `app:layout_overflowText` on
36
81
on each child, as that will show as the text of the menu item that corresponds
37
82
to the hidden child. Optionally, you can also set `app:layout_overflowIcon`.
Popup overflow menu theme attribute: `?attr/overflowLinearLayoutPopupMenuStyle`
84
-
(defaults to `?attr/popupMenuStyle`)
85
-
86
-
See the full list of
87
-
[styles](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/overflow/res/values/styles.xml) and
88
-
[overflow linear layout attributes](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/overflow/res/values/attrs.xml)
0 commit comments