|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | +<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | | - android:id="@+id/main_content" |
| 5 | + android:id="@+id/drawer_layout" |
6 | 6 | android:layout_width="match_parent" |
7 | | - android:layout_height="match_parent" |
8 | | - android:background="?attr/colorBg"> |
| 7 | + android:layout_height="match_parent"> |
| 8 | + |
| 9 | + <RelativeLayout |
| 10 | + android:id="@+id/main_content" |
| 11 | + android:layout_width="match_parent" |
| 12 | + android:layout_height="match_parent" |
| 13 | + android:background="?attr/colorBg"> |
9 | 14 |
|
10 | 15 | <FrameLayout |
11 | 16 | android:id="@+id/banner_home" |
|
341 | 346 | </FrameLayout> |
342 | 347 | </RelativeLayout> |
343 | 348 | </com.google.android.material.card.MaterialCardView> |
344 | | -</RelativeLayout> |
| 349 | + </RelativeLayout> |
| 350 | + |
| 351 | + <!-- MikuRay-style card navigation drawer --> |
| 352 | + <androidx.core.widget.NestedScrollView |
| 353 | + android:layout_width="304dp" |
| 354 | + android:layout_height="match_parent" |
| 355 | + android:layout_gravity="start" |
| 356 | + android:background="?attr/colorBg" |
| 357 | + android:clipToPadding="false" |
| 358 | + android:fitsSystemWindows="true" |
| 359 | + android:paddingStart="12dp" |
| 360 | + android:paddingTop="24dp" |
| 361 | + android:paddingEnd="12dp" |
| 362 | + android:paddingBottom="24dp"> |
| 363 | + |
| 364 | + <LinearLayout |
| 365 | + android:layout_width="match_parent" |
| 366 | + android:layout_height="wrap_content" |
| 367 | + android:orientation="vertical"> |
| 368 | + |
| 369 | + <com.google.android.material.card.MaterialCardView |
| 370 | + android:layout_width="match_parent" |
| 371 | + android:layout_height="150dp" |
| 372 | + app:cardCornerRadius="24dp" |
| 373 | + app:cardElevation="0dp"> |
| 374 | + |
| 375 | + <ImageView |
| 376 | + android:layout_width="match_parent" |
| 377 | + android:layout_height="match_parent" |
| 378 | + android:contentDescription="@null" |
| 379 | + android:scaleType="centerCrop" |
| 380 | + android:src="@drawable/uwu_banner_profile" /> |
| 381 | + |
| 382 | + <View |
| 383 | + android:layout_width="match_parent" |
| 384 | + android:layout_height="match_parent" |
| 385 | + android:background="@drawable/uwu_bg_fade_bottom" /> |
| 386 | + |
| 387 | + <LinearLayout |
| 388 | + android:layout_width="match_parent" |
| 389 | + android:layout_height="match_parent" |
| 390 | + android:gravity="bottom" |
| 391 | + android:orientation="vertical" |
| 392 | + android:padding="16dp"> |
| 393 | + |
| 394 | + <TextView |
| 395 | + android:layout_width="wrap_content" |
| 396 | + android:layout_height="wrap_content" |
| 397 | + android:fontFamily="@font/uwu_font_title" |
| 398 | + android:text="@string/drawer_greeting" |
| 399 | + android:textColor="@android:color/white" |
| 400 | + android:textSize="20sp" |
| 401 | + android:textStyle="bold" /> |
| 402 | + |
| 403 | + <TextView |
| 404 | + android:layout_width="wrap_content" |
| 405 | + android:layout_height="wrap_content" |
| 406 | + android:fontFamily="@font/uwu_font_summary" |
| 407 | + android:text="@string/drawer_subtitle" |
| 408 | + android:textColor="@android:color/white" |
| 409 | + android:textSize="12sp" /> |
| 410 | + </LinearLayout> |
| 411 | + </com.google.android.material.card.MaterialCardView> |
| 412 | + |
| 413 | + <TextView |
| 414 | + android:layout_width="wrap_content" |
| 415 | + android:layout_height="wrap_content" |
| 416 | + android:layout_marginStart="8dp" |
| 417 | + android:layout_marginTop="18dp" |
| 418 | + android:layout_marginBottom="4dp" |
| 419 | + android:fontFamily="@font/uwu_font_summary" |
| 420 | + android:text="@string/drawer_section_manage" |
| 421 | + android:textColor="?attr/colorPrimary" |
| 422 | + android:textSize="13sp" /> |
| 423 | + |
| 424 | + <include |
| 425 | + android:id="@+id/drawer_proxies" |
| 426 | + layout="@layout/item_drawer_entry" /> |
| 427 | + |
| 428 | + <include |
| 429 | + android:id="@+id/drawer_settings" |
| 430 | + layout="@layout/item_drawer_entry" /> |
| 431 | + |
| 432 | + <include |
| 433 | + android:id="@+id/drawer_apps" |
| 434 | + layout="@layout/item_drawer_entry" /> |
| 435 | + |
| 436 | + <TextView |
| 437 | + android:layout_width="wrap_content" |
| 438 | + android:layout_height="wrap_content" |
| 439 | + android:layout_marginStart="8dp" |
| 440 | + android:layout_marginTop="18dp" |
| 441 | + android:layout_marginBottom="4dp" |
| 442 | + android:fontFamily="@font/uwu_font_summary" |
| 443 | + android:text="@string/drawer_section_tools" |
| 444 | + android:textColor="?attr/colorPrimary" |
| 445 | + android:textSize="13sp" /> |
| 446 | + |
| 447 | + <include |
| 448 | + android:id="@+id/drawer_logcat" |
| 449 | + layout="@layout/item_drawer_entry" /> |
| 450 | + |
| 451 | + <include |
| 452 | + android:id="@+id/drawer_tools" |
| 453 | + layout="@layout/item_drawer_entry" /> |
| 454 | + |
| 455 | + <include |
| 456 | + android:id="@+id/drawer_about" |
| 457 | + layout="@layout/item_drawer_entry" /> |
| 458 | + </LinearLayout> |
| 459 | + </androidx.core.widget.NestedScrollView> |
| 460 | +</androidx.drawerlayout.widget.DrawerLayout> |
0 commit comments