|
31 | 31 | app:title="@string/cat_floating_toolbar_title"/>
|
32 | 32 | </com.google.android.material.appbar.AppBarLayout>
|
33 | 33 |
|
34 |
| - <androidx.core.widget.NestedScrollView |
| 34 | +<androidx.core.widget.NestedScrollView |
| 35 | + android:layout_width="match_parent" |
| 36 | + android:layout_height="match_parent" |
| 37 | + app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
| 38 | + |
| 39 | + <LinearLayout |
| 40 | + android:id="@+id/body_container" |
35 | 41 | android:layout_width="match_parent"
|
36 |
| - android:layout_height="match_parent" |
37 |
| - app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
38 |
| - <LinearLayout |
39 |
| - android:id="@+id/body_container" |
40 |
| - android:layout_width="match_parent" |
| 42 | + android:layout_height="wrap_content" |
| 43 | + android:gravity="center" |
| 44 | + android:orientation="vertical"> |
| 45 | + |
| 46 | + <TextView |
| 47 | + android:layout_width="wrap_content" |
| 48 | + android:layout_height="wrap_content" |
| 49 | + android:layout_marginBottom="4dp" |
| 50 | + android:text="@string/cat_floating_toolbar_orientation" |
| 51 | + android:textAppearance="?attr/textAppearanceBody1" /> |
| 52 | + |
| 53 | + <com.google.android.material.button.MaterialButtonToggleGroup |
| 54 | + android:layout_width="wrap_content" |
41 | 55 | android:layout_height="wrap_content"
|
42 |
| - android:gravity="center" |
43 |
| - android:orientation="vertical"> |
| 56 | + app:selectionRequired="true" |
| 57 | + app:singleSelection="true"> |
44 | 58 |
|
45 |
| - <TextView |
| 59 | + <Button |
| 60 | + android:id="@+id/bottom_button" |
| 61 | + style="?attr/materialButtonOutlinedStyle" |
46 | 62 | android:layout_width="wrap_content"
|
47 | 63 | android:layout_height="wrap_content"
|
48 |
| - android:layout_marginBottom="4dp" |
49 |
| - android:text="@string/cat_floating_toolbar_orientation" |
50 |
| - android:textAppearance="?attr/textAppearanceBody1"/> |
| 64 | + android:text="@string/cat_floating_toolbar_orientation_bottom" /> |
51 | 65 |
|
52 |
| - <com.google.android.material.button.MaterialButtonToggleGroup |
| 66 | + <Button |
| 67 | + android:id="@+id/left_button" |
| 68 | + style="?attr/materialButtonOutlinedStyle" |
53 | 69 | android:layout_width="wrap_content"
|
54 | 70 | android:layout_height="wrap_content"
|
55 |
| - app:selectionRequired="true" |
56 |
| - app:singleSelection="true"> |
57 |
| - <Button |
58 |
| - android:id="@+id/bottom_button" |
59 |
| - style="?attr/materialButtonOutlinedStyle" |
60 |
| - android:layout_width="wrap_content" |
61 |
| - android:layout_height="wrap_content" |
62 |
| - android:text="@string/cat_floating_toolbar_orientation_bottom" /> |
63 |
| - <Button |
64 |
| - android:id="@+id/left_button" |
65 |
| - style="?attr/materialButtonOutlinedStyle" |
66 |
| - android:layout_width="wrap_content" |
67 |
| - android:layout_height="wrap_content" |
68 |
| - android:text="@string/cat_floating_toolbar_orientation_left" /> |
69 |
| - <Button |
70 |
| - android:id="@+id/right_button" |
71 |
| - style="?attr/materialButtonOutlinedStyle" |
72 |
| - android:layout_width="wrap_content" |
73 |
| - android:layout_height="wrap_content" |
74 |
| - android:text="@string/cat_floating_toolbar_orientation_right" /> |
75 |
| - </com.google.android.material.button.MaterialButtonToggleGroup> |
76 |
| - |
77 |
| - <TextView |
78 |
| - android:id="@+id/body_text" |
79 |
| - android:layout_width="match_parent" |
80 |
| - android:layout_height="wrap_content" |
81 |
| - android:layout_margin="16dp" |
82 |
| - android:lineSpacingMultiplier="1.2" |
83 |
| - android:text="@string/cat_floating_toolbar_filler_text" /> |
| 71 | + android:text="@string/cat_floating_toolbar_orientation_left" /> |
84 | 72 |
|
85 |
| - </LinearLayout> |
86 |
| - </androidx.core.widget.NestedScrollView> |
| 73 | + <Button |
| 74 | + android:id="@+id/right_button" |
| 75 | + style="?attr/materialButtonOutlinedStyle" |
| 76 | + android:layout_width="wrap_content" |
| 77 | + android:layout_height="wrap_content" |
| 78 | + android:text="@string/cat_floating_toolbar_orientation_right" /> |
| 79 | + </com.google.android.material.button.MaterialButtonToggleGroup> |
87 | 80 |
|
88 |
| - <com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
89 |
| - android:id="@+id/floating_toolbar_left" |
90 |
| - style="@style/Widget.Material3.FloatingToolbar.Vertical.Vibrant" |
91 |
| - android:layout_width="wrap_content" |
92 |
| - android:layout_height="wrap_content" |
93 |
| - android:layout_gravity="left|center" |
94 |
| - android:visibility="gone"> |
95 |
| - <LinearLayout |
96 |
| - android:id="@+id/floating_toolbar_child_left" |
| 81 | + <TextView |
| 82 | + android:id="@+id/body_text" |
97 | 83 | android:layout_width="match_parent"
|
98 | 84 | android:layout_height="wrap_content"
|
99 |
| - android:layout_gravity="center"> |
100 |
| - <include layout="@layout/cat_floating_toolbar_content" /> |
101 |
| - </LinearLayout> |
102 |
| - </com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
103 |
| - |
104 |
| - <com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
105 |
| - android:id="@+id/floating_toolbar_right" |
106 |
| - style="@style/Widget.Material3.FloatingToolbar.Vertical" |
107 |
| - android:layout_width="wrap_content" |
| 85 | + android:layout_margin="16dp" |
| 86 | + android:lineSpacingMultiplier="1.2" |
| 87 | + android:text="@string/cat_floating_toolbar_filler_text" /> |
| 88 | + |
| 89 | + </LinearLayout> |
| 90 | +</androidx.core.widget.NestedScrollView> |
| 91 | + |
| 92 | +<com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
| 93 | + android:id="@+id/floating_toolbar_left" |
| 94 | + android:layout_width="wrap_content" |
| 95 | + android:layout_height="wrap_content" |
| 96 | + android:layout_gravity="left|center" |
| 97 | + android:layout_margin="16dp" |
| 98 | + android:visibility="gone"> |
| 99 | + |
| 100 | + <LinearLayout |
| 101 | + android:id="@+id/floating_toolbar_child_left" |
| 102 | + android:layout_width="match_parent" |
108 | 103 | android:layout_height="wrap_content"
|
109 |
| - android:visibility="gone"> |
110 |
| - <LinearLayout |
111 |
| - android:id="@+id/floating_toolbar_child_right" |
112 |
| - android:layout_width="match_parent" |
113 |
| - android:layout_height="wrap_content" |
114 |
| - android:layout_gravity="center"> |
115 |
| - <include layout="@layout/cat_floating_toolbar_content" /> |
116 |
| - </LinearLayout> |
117 |
| - </com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
118 |
| - |
119 |
| - <com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
120 |
| - android:id="@+id/floating_toolbar_bottom" |
121 |
| - style="@style/Widget.Material3.FloatingToolbar.Horizontal.Vibrant" |
122 |
| - android:layout_width="wrap_content" |
123 |
| - android:layout_height="wrap_content"> |
124 |
| - <LinearLayout |
125 |
| - android:id="@+id/floating_toolbar_child_bottom" |
126 |
| - android:layout_width="match_parent" |
127 |
| - android:layout_height="wrap_content" |
128 |
| - android:layout_gravity="center"> |
129 |
| - <include layout="@layout/cat_floating_toolbar_content" /> |
130 |
| - </LinearLayout> |
131 |
| - </com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
| 104 | + android:layout_gravity="center" |
| 105 | + android:orientation="vertical"> |
| 106 | + |
| 107 | + <include layout="@layout/cat_floating_toolbar_content" /> |
| 108 | + </LinearLayout> |
| 109 | +</com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
| 110 | + |
| 111 | +<com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
| 112 | + android:id="@+id/floating_toolbar_right" |
| 113 | + android:layout_width="wrap_content" |
| 114 | + android:layout_height="wrap_content" |
| 115 | + android:layout_gravity="right|center" |
| 116 | + android:layout_margin="16dp" |
| 117 | + android:visibility="gone"> |
| 118 | + |
| 119 | + <LinearLayout |
| 120 | + android:id="@+id/floating_toolbar_child_right" |
| 121 | + android:layout_width="match_parent" |
| 122 | + android:layout_height="wrap_content" |
| 123 | + android:layout_gravity="center" |
| 124 | + android:orientation="vertical"> |
| 125 | + |
| 126 | + <include layout="@layout/cat_floating_toolbar_content" /> |
| 127 | + </LinearLayout> |
| 128 | +</com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
| 129 | + |
| 130 | +<com.google.android.material.floatingtoolbar.FloatingToolbarLayout |
| 131 | + android:id="@+id/floating_toolbar_bottom" |
| 132 | + style="?attr/floatingToolbarVibrantStyle" |
| 133 | + android:layout_width="wrap_content" |
| 134 | + android:layout_height="wrap_content" |
| 135 | + android:layout_gravity="bottom|center" |
| 136 | + android:layout_margin="16dp"> |
| 137 | + |
| 138 | + <LinearLayout |
| 139 | + android:id="@+id/floating_toolbar_child_bottom" |
| 140 | + android:layout_width="match_parent" |
| 141 | + android:layout_height="wrap_content" |
| 142 | + android:layout_gravity="center" |
| 143 | + android:orientation="horizontal"> |
| 144 | + |
| 145 | + <include layout="@layout/cat_floating_toolbar_content" /> |
| 146 | + </LinearLayout> |
| 147 | +</com.google.android.material.floatingtoolbar.FloatingToolbarLayout> |
132 | 148 | </androidx.coordinatorlayout.widget.CoordinatorLayout>
|
0 commit comments