diff options
Diffstat (limited to 'app/src/main/res/layout/drawer_layout.xml')
-rw-r--r-- | app/src/main/res/layout/drawer_layout.xml | 133 |
1 files changed, 33 insertions, 100 deletions
diff --git a/app/src/main/res/layout/drawer_layout.xml b/app/src/main/res/layout/drawer_layout.xml index 74419fd9..ec445d1c 100644 --- a/app/src/main/res/layout/drawer_layout.xml +++ b/app/src/main/res/layout/drawer_layout.xml @@ -5,7 +5,6 @@ android:id="@+id/drawerLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:fitsSystemWindows="true" tools:openDrawer="left"> <include @@ -23,7 +22,8 @@ <androidx.core.widget.NestedScrollView android:id="@+id/scrollView" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:background="?attr/colorPrimary"> <LinearLayout android:layout_width="match_parent" @@ -33,120 +33,53 @@ <RelativeLayout android:id="@+id/header_view" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?attr/colorPrimary" - android:theme="@style/ThemeOverlay.AppCompat.Dark"> - - <androidx.appcompat.widget.AppCompatImageView - android:layout_width="match_parent" - android:layout_height="164dp" - android:contentDescription="@null" - android:scaleType="centerCrop" - app:srcCompat="@drawable/background" /> + android:layout_height="@dimen/drawer_header_height" + android:background="@color/defaultBrand"> <androidx.appcompat.widget.AppCompatImageView - android:id="@+id/current_account_image" - android:layout_width="@dimen/avatar_size" - android:layout_height="@dimen/avatar_size" - android:layout_gravity="center_vertical" - android:layout_marginStart="@dimen/header_padding" - android:layout_marginLeft="@dimen/header_padding" - android:layout_marginTop="46dp" - android:contentDescription="@string/app_name" - app:srcCompat="@mipmap/ic_launcher" /> + android:id="@+id/logo" + android:layout_width="@dimen/drawer_header_logo_size" + android:layout_height="@dimen/drawer_header_logo_size" + android:layout_centerVertical="true" + android:layout_margin="@dimen/spacer_2x" + android:gravity="center" + app:srcCompat="@drawable/ic_launcher_foreground_full" /> <TextView android:id="@+id/app_name" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/current_account_image" - android:layout_marginTop="6dp" - android:layout_marginStart="@dimen/header_padding" - android:layout_marginLeft="@dimen/header_padding" - android:layout_marginEnd="@dimen/header_padding" - android:layout_marginRight="@dimen/header_padding" - android:ellipsize="end" - android:shadowColor="@android:color/black" - android:shadowDx="0.5" - android:shadowDy="0" - android:shadowRadius="2" - android:text="@string/app_name_long" - android:textColor="@android:color/white" - android:textSize="14sp" - android:textStyle="bold" /> - - <TextView - android:id="@+id/account" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@+id/app_name" - android:layout_marginStart="@dimen/header_padding" - android:layout_marginLeft="@dimen/header_padding" - android:layout_marginEnd="@dimen/widget_margin" - android:layout_marginRight="@dimen/widget_margin" + android:layout_centerVertical="true" + android:layout_toEndOf="@id/logo" + android:layout_toRightOf="@id/logo" android:ellipsize="end" - android:maxLines="1" - android:shadowColor="@android:color/black" - android:layout_alignParentStart="true" - android:layout_toStartOf="@id/account_arrow" - android:shadowDx="0.5" - android:shadowDy="0" - android:shadowRadius="2" + android:fontFamily="sans-serif-light" + android:gravity="center_vertical" + android:text="@string/app_name" android:textColor="@android:color/white" - android:textSize="12sp" - tools:text="user@nextcloud.example.comuser@nextcloud.example.comuser@nextcloud.example.com" - android:layout_alignParentLeft="true" - android:layout_toLeftOf="@id/account_arrow" /> - - <androidx.appcompat.widget.AppCompatImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/account_arrow" - app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" - android:layout_alignParentEnd="true" - android:layout_alignBottom="@+id/account" - android:layout_marginEnd="@dimen/header_padding" - android:layout_alignParentRight="true" - android:layout_marginRight="@dimen/header_padding" /> + android:textSize="24sp" /> </RelativeLayout> - <LinearLayout - android:id="@+id/accountNavigation" + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/navigationList" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/navigationList" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingBottom="8dp" - app:layoutManager="LinearLayoutManager" - tools:listitem="@layout/item_navigation" /> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/navigationMenu" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingBottom="8dp" - app:layoutManager="LinearLayoutManager" - tools:listitem="@layout/item_navigation" /> - </LinearLayout> - - <LinearLayout - android:id="@+id/accountChooser" + android:paddingTop="@dimen/spacer_1x" + android:paddingBottom="@dimen/spacer_1x" + app:layoutManager="LinearLayoutManager" + tools:itemCount="6" + tools:listitem="@layout/item_navigation" /> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/navigationMenu" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:orientation="vertical" - android:visibility="gone"/> + android:paddingTop="@dimen/spacer_1x" + android:paddingBottom="@dimen/spacer_1x" + app:layoutManager="LinearLayoutManager" + tools:itemCount="3" + tools:listitem="@layout/item_navigation" /> </LinearLayout> - </androidx.core.widget.NestedScrollView> - </com.google.android.material.navigation.NavigationView> - </androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file |