<?xml version="1.0" encoding="utf-8"?> <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical" android:padding="@dimen/dp_5"> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="@dimen/dp_10" app:cardCornerRadius="@dimen/dp_5" app:cardUseCompatPadding="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="128dp" android:background="@mipmap/home_top" android:orientation="vertical"> <ImageView android:id="@+id/userIconView" android:layout_width="72dp" android:layout_height="72dp" android:layout_marginStart="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10" android:layout_marginEnd="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10" android:src="@mipmap/app_logo" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_10" android:layout_toEndOf="@id/userIconView" android:orientation="vertical"> <TextView android:id="@+id/userNameView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginVertical="@dimen/dp_5" android:text="@string/app_name" android:textColor="@color/white" android:textSize="@dimen/sp_16" /> <TextView android:id="@+id/userDeptView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_5" android:text="@string/app_name" android:textColor="@color/white" android:textSize="@dimen/sp_16" /> </LinearLayout> <TextView android:id="@+id/lastTimeView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" android:layout_margin="@dimen/dp_10" android:text="22点30分" android:textColor="@color/white" /> </RelativeLayout> </androidx.cardview.widget.CardView> <androidx.recyclerview.widget.RecyclerView android:id="@+id/homeRecyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:nestedScrollingEnabled="false" android:scrollbars="vertical" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:spanCount="3" /> </LinearLayout> </androidx.core.widget.NestedScrollView>