|
2 | 2 | <!-- |
3 | 3 | ~ Nextcloud - Android Client |
4 | 4 | ~ |
| 5 | + ~ SPDX-FileCopyrightText: 2017-2025 Andy Scherzinger <info@andy-scherzinger> |
5 | 6 | ~ SPDX-FileCopyrightText: 2018-2020 Tobias Kaminsky <[email protected]> |
6 | | - ~ SPDX-FileCopyrightText: 2017-2020 Andy Scherzinger <info@andy-scherzinger> |
7 | | - ~ SPDX-FileCopyrightText: 22020 Joris Bodin <[email protected]> |
| 7 | + ~ SPDX-FileCopyrightText: 2020 Joris Bodin <[email protected]> |
8 | 8 | ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only |
9 | 9 | --> |
10 | 10 | <com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
16 | 16 | android:background="@color/bg_default"> |
17 | 17 |
|
18 | 18 | <FrameLayout |
| 19 | + android:id="@+id/toolbar_frame" |
19 | 20 | android:layout_width="match_parent" |
20 | 21 | android:layout_height="wrap_content" |
21 | | - android:id="@+id/toolbar_frame" |
22 | 22 | app:layout_scrollFlags="scroll|enterAlways"> |
23 | 23 |
|
24 | 24 | <!-- sorting/layout bar --> |
|
56 | 56 | <com.google.android.material.button.MaterialButton |
57 | 57 | android:id="@+id/switch_grid_view_button" |
58 | 58 | style="@style/Widget.AppTheme.Button.IconButton" |
59 | | - android:layout_width="48dp" |
60 | | - android:layout_height="48dp" |
| 59 | + android:layout_width="@dimen/minimum_size_for_touchable_area" |
| 60 | + android:layout_height="@dimen/minimum_size_for_touchable_area" |
61 | 61 | android:layout_marginEnd="1dp" |
62 | 62 | android:contentDescription="@string/action_switch_grid_view" |
63 | | - app:cornerRadius="24dp" |
| 63 | + app:cornerRadius="@dimen/button_corner_radius" |
64 | 64 | app:icon="@drawable/ic_view_module" |
65 | 65 | app:iconTint="@color/fontAppbar" |
66 | 66 | app:layout_constraintBottom_toBottomOf="parent" |
|
116 | 116 |
|
117 | 117 | <LinearLayout |
118 | 118 | android:id="@+id/toolbar_linear_layout" |
119 | | - android:visibility="gone" |
120 | | - tools:visibility="visible" |
| 119 | + android:layout_width="match_parent" |
| 120 | + android:layout_height="wrap_content" |
| 121 | + android:layout_marginStart="@dimen/standard_half_margin" |
| 122 | + android:layout_marginTop="@dimen/standard_half_margin" |
| 123 | + android:layout_marginEnd="@dimen/standard_margin" |
| 124 | + android:layout_marginBottom="@dimen/standard_quarter_margin" |
121 | 125 | android:orientation="horizontal" |
122 | | - android:layout_marginStart="8dp" |
123 | | - android:layout_marginTop="8dp" |
124 | | - android:layout_marginEnd="16dp" |
125 | | - android:layout_marginBottom="4dp" |
| 126 | + android:visibility="gone" |
126 | 127 | app:layout_constraintBottom_toBottomOf="parent" |
127 | 128 | app:layout_constraintStart_toStartOf="parent" |
128 | 129 | app:layout_constraintTop_toTopOf="parent" |
129 | | - android:layout_width="match_parent" |
130 | | - android:layout_height="wrap_content"> |
| 130 | + tools:visibility="visible"> |
131 | 131 |
|
132 | 132 | <com.google.android.material.button.MaterialButton |
133 | 133 | android:id="@+id/toolbar_menu_button" |
134 | 134 | style="@style/Widget.AppTheme.Button.IconButton" |
135 | | - android:layout_width="48dp" |
136 | | - android:layout_height="48dp" |
| 135 | + android:layout_width="@dimen/minimum_size_for_touchable_area" |
| 136 | + android:layout_height="@dimen/minimum_size_for_touchable_area" |
137 | 137 | app:cornerRadius="@dimen/button_corner_radius" |
138 | 138 | app:icon="@drawable/ic_menu" |
139 | 139 | app:iconTint="@color/black" /> |
|
145 | 145 | android:lines="1" |
146 | 146 | android:textSize="16sp" |
147 | 147 | android:layout_width="wrap_content" |
148 | | - android:layout_height="48dp"/> |
| 148 | + android:layout_height="@dimen/minimum_size_for_touchable_area"/> |
149 | 149 |
|
150 | 150 | </LinearLayout> |
151 | 151 |
|
152 | | - |
153 | 152 | <!-- home/search toolbar --> |
154 | | - <com.google.android.material.card.MaterialCardView |
| 153 | + <LinearLayout |
155 | 154 | android:id="@+id/home_toolbar" |
156 | 155 | android:layout_width="match_parent" |
157 | | - android:layout_height="50dp" |
158 | | - android:layout_marginStart="16dp" |
159 | | - android:layout_marginTop="8dp" |
160 | | - android:layout_marginEnd="16dp" |
161 | | - android:layout_marginBottom="4dp" |
| 156 | + android:layout_height="match_parent" |
| 157 | + android:layout_marginTop="@dimen/standard_half_margin" |
| 158 | + android:orientation="horizontal" |
162 | 159 | android:visibility="gone" |
163 | | - app:background="@color/appbar" |
164 | | - app:cardCornerRadius="25dp" |
165 | | - app:cardElevation="2dp" |
166 | | - app:strokeWidth="0dp" |
167 | 160 | tools:visibility="visible"> |
168 | 161 |
|
169 | | - <androidx.constraintlayout.widget.ConstraintLayout |
170 | | - android:layout_width="match_parent" |
171 | | - android:layout_height="match_parent"> |
172 | | - |
173 | | - <com.google.android.material.button.MaterialButton |
174 | | - android:id="@+id/menu_button" |
175 | | - style="@style/Widget.AppTheme.Button.IconButton" |
176 | | - android:layout_width="48dp" |
177 | | - android:layout_height="48dp" |
178 | | - android:layout_marginStart="5dp" |
179 | | - android:contentDescription="@string/action_switch_grid_view" |
180 | | - app:cornerRadius="@dimen/button_corner_radius" |
181 | | - app:icon="@drawable/ic_menu" |
182 | | - app:iconTint="@color/fontAppbar" |
183 | | - app:iconSize="@dimen/search_bar_icon_size" |
184 | | - app:layout_constraintBottom_toBottomOf="parent" |
185 | | - app:layout_constraintStart_toStartOf="parent" |
186 | | - app:layout_constraintTop_toTopOf="parent" /> |
187 | | - |
188 | | - <com.google.android.material.textview.MaterialTextView |
189 | | - android:id="@+id/search_text" |
190 | | - android:layout_width="0dp" |
191 | | - android:layout_height="48dp" |
192 | | - android:layout_marginStart="7dp" |
193 | | - android:layout_marginEnd="18dp" |
194 | | - android:ellipsize="end" |
195 | | - android:gravity="start|center_vertical" |
196 | | - android:lines="1" |
197 | | - android:textColor="@color/fontSecondaryAppbar" |
198 | | - android:textSize="16sp" |
199 | | - app:layout_constraintBottom_toBottomOf="parent" |
200 | | - app:layout_constraintLeft_toRightOf="@id/menu_button" |
201 | | - app:layout_constraintRight_toLeftOf="@id/notification_button" |
202 | | - app:layout_constraintTop_toTopOf="parent" |
203 | | - tools:text="@string/placeholder_search_in_nextcloud" /> |
204 | | - |
205 | | - <com.google.android.material.button.MaterialButton |
206 | | - android:id="@+id/notification_button" |
207 | | - style="@style/Widget.AppTheme.Button.IconButton" |
208 | | - android:layout_width="48dp" |
209 | | - android:layout_height="48dp" |
210 | | - android:contentDescription="@string/notification_icon_description" |
211 | | - app:cornerRadius="@dimen/button_corner_radius" |
212 | | - app:iconSize="@dimen/search_bar_icon_size" |
213 | | - app:icon="@drawable/ic_notification" |
214 | | - app:iconTint="@color/fontAppbar" |
215 | | - app:layout_constraintBottom_toBottomOf="parent" |
216 | | - app:layout_constraintEnd_toStartOf="@id/switch_account_button" |
217 | | - app:layout_constraintTop_toTopOf="parent" /> |
218 | | - |
219 | | - <com.google.android.material.button.MaterialButton |
220 | | - android:id="@+id/switch_account_button" |
221 | | - style="@style/Widget.AppTheme.Button.IconButton" |
222 | | - android:layout_width="48dp" |
223 | | - android:layout_height="48dp" |
224 | | - app:cornerRadius="@dimen/button_corner_radius" |
225 | | - app:iconSize="30dp" |
226 | | - app:layout_constraintBottom_toBottomOf="parent" |
227 | | - app:layout_constraintEnd_toEndOf="parent" |
228 | | - app:layout_constraintTop_toTopOf="parent" /> |
229 | | - |
230 | | - </androidx.constraintlayout.widget.ConstraintLayout> |
231 | | - |
232 | | - </com.google.android.material.card.MaterialCardView> |
| 162 | + <com.google.android.material.button.MaterialButton |
| 163 | + android:id="@+id/menu_button" |
| 164 | + style="@style/Widget.AppTheme.Button.IconButton" |
| 165 | + android:layout_width="@dimen/minimum_size_for_touchable_area" |
| 166 | + android:layout_height="@dimen/minimum_size_for_touchable_area" |
| 167 | + android:layout_marginStart="@dimen/standard_quarter_margin" |
| 168 | + android:layout_marginEnd="@dimen/standard_half_margin" |
| 169 | + android:contentDescription="@string/drawer_open" |
| 170 | + app:cornerRadius="@dimen/button_corner_radius" |
| 171 | + app:icon="@drawable/ic_menu" |
| 172 | + app:iconSize="@dimen/search_bar_icon_size" |
| 173 | + app:iconTint="@color/fontAppbar" /> |
| 174 | + |
| 175 | + <com.google.android.material.card.MaterialCardView |
| 176 | + android:id="@+id/home_search_container" |
| 177 | + android:layout_width="0dp" |
| 178 | + android:layout_height="50dp" |
| 179 | + android:layout_marginEnd="@dimen/standard_half_margin" |
| 180 | + android:layout_marginBottom="4dp" |
| 181 | + android:layout_weight="1" |
| 182 | + app:background="@color/appbar" |
| 183 | + app:cardCornerRadius="25dp" |
| 184 | + app:cardElevation="2dp" |
| 185 | + app:strokeWidth="0dp"> |
| 186 | + |
| 187 | + <LinearLayout |
| 188 | + android:layout_width="match_parent" |
| 189 | + android:layout_height="match_parent" |
| 190 | + android:orientation="horizontal"> |
| 191 | + |
| 192 | + <com.google.android.material.textview.MaterialTextView |
| 193 | + android:id="@+id/search_text" |
| 194 | + android:layout_width="0dp" |
| 195 | + android:layout_height="match_parent" |
| 196 | + android:layout_marginStart="@dimen/standard_margin" |
| 197 | + android:layout_marginEnd="@dimen/zero" |
| 198 | + android:layout_weight="1" |
| 199 | + android:ellipsize="end" |
| 200 | + android:gravity="start|center_vertical" |
| 201 | + android:lines="1" |
| 202 | + android:textColor="@color/fontSecondaryAppbar" |
| 203 | + android:textSize="16sp" |
| 204 | + tools:text="@string/placeholder_search_in_nextcloud" /> |
| 205 | + |
| 206 | + <com.google.android.material.button.MaterialButton |
| 207 | + android:id="@+id/notification_button" |
| 208 | + style="@style/Widget.AppTheme.Button.IconButton" |
| 209 | + android:layout_width="@dimen/minimum_size_for_touchable_area" |
| 210 | + android:layout_height="@dimen/minimum_size_for_touchable_area" |
| 211 | + android:layout_marginStart="@dimen/zero" |
| 212 | + android:layout_marginEnd="@dimen/standard_quarter_margin" |
| 213 | + android:contentDescription="@string/notification_icon_description" |
| 214 | + app:cornerRadius="@dimen/button_corner_radius" |
| 215 | + app:icon="@drawable/ic_notification" |
| 216 | + app:iconSize="@dimen/search_bar_icon_size" |
| 217 | + app:iconTint="@color/fontAppbar" |
| 218 | + app:layout_constraintBottom_toBottomOf="parent" |
| 219 | + app:layout_constraintStart_toEndOf="@id/switch_account_button" |
| 220 | + app:layout_constraintTop_toTopOf="parent" /> |
| 221 | + |
| 222 | + </LinearLayout> |
| 223 | + |
| 224 | + </com.google.android.material.card.MaterialCardView> |
| 225 | + |
| 226 | + <com.google.android.material.button.MaterialButton |
| 227 | + android:id="@+id/switch_account_button" |
| 228 | + style="@style/Widget.AppTheme.Button.IconButton" |
| 229 | + android:layout_width="@dimen/minimum_size_for_touchable_area" |
| 230 | + android:layout_height="@dimen/minimum_size_for_touchable_area" |
| 231 | + android:layout_marginEnd="@dimen/standard_quarter_margin" |
| 232 | + app:cornerRadius="@dimen/button_corner_radius" |
| 233 | + app:iconSize="30dp" |
| 234 | + tools:icon="@drawable/ic_user_outline" /> |
| 235 | + </LinearLayout> |
233 | 236 |
|
234 | 237 | </FrameLayout> |
235 | 238 |
|
|
0 commit comments