Skip to content

Commit a12f17a

Browse files
leticiarossipekingme
authored andcommitted
[OverflowLinearLayout] Added OverflowLinearLayout to support adaptive behavior of the floating and docked toolbars.
When wrapping the floating/docked toolbar's children in a OverflowLinearLayout, the toolbar will automatically move children to an overflow menu when there's not enough screen space for all the items to fit in the toolbar. The children moved to an overflow menu will always be the ones at the end of the toolbar that do not fit the max toolbar size. An overflow button will be automatically placed as the last child of the toolbar when overflow happens. PiperOrigin-RevId: 757750540
1 parent def80c5 commit a12f17a

File tree

14 files changed

+626
-0
lines changed

14 files changed

+626
-0
lines changed

catalog/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def srcDirs = [
8585
'musicplayer',
8686
'navigationrail',
8787
'navigationdrawer',
88+
'overflow',
8889
'preferences',
8990
'progressindicator',
9091
'radiobutton',

lib/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def srcDirs = [
7575
'com/google/android/material/motion',
7676
'com/google/android/material/navigation',
7777
'com/google/android/material/navigationrail',
78+
'com/google/android/material/overflow',
7879
'com/google/android/material/progressindicator',
7980
'com/google/android/material/radiobutton',
8081
'com/google/android/material/resources',

lib/java/com/google/android/material/dialog/res/values/themes_base.xml

+2
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
<item name="materialSwitchStyle">@style/Widget.Material3.CompoundButton.MaterialSwitch</item>
308308
<item name="navigationRailStyle">@style/Widget.Material3.NavigationRailView</item>
309309
<item name="navigationViewStyle">@style/Widget.Material3.NavigationView</item>
310+
<item name="overflowLinearLayoutStyle">@style/Widget.Material3.OverflowLinearLayout</item>
310311
<item name="radioButtonStyle">@style/Widget.Material3.CompoundButton.RadioButton</item>
311312
<item name="sliderStyle">@style/Widget.Material3.Slider</item>
312313
<item name="snackbarStyle">@style/Widget.Material3.Snackbar</item>
@@ -608,6 +609,7 @@
608609
<item name="materialSwitchStyle">@style/Widget.Material3.CompoundButton.MaterialSwitch</item>
609610
<item name="navigationRailStyle">@style/Widget.Material3.NavigationRailView</item>
610611
<item name="navigationViewStyle">@style/Widget.Material3.NavigationView</item>
612+
<item name="overflowLinearLayoutStyle">@style/Widget.Material3.OverflowLinearLayout</item>
611613
<item name="radioButtonStyle">@style/Widget.Material3.CompoundButton.RadioButton</item>
612614
<item name="sliderStyle">@style/Widget.Material3.Slider</item>
613615
<item name="snackbarStyle">@style/Widget.Material3.Snackbar</item>

0 commit comments

Comments
 (0)