<?xml version="1.0" encoding="utf-8"?> <LinearLayout 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="match_parent" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/homeBackColor"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="华新燃气" android:textColor="@color/white" android:textSize="@dimen/titleFontSize" /> <ImageView android:id="@+id/scannerView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:layout_marginEnd="@dimen/margin_10dp" android:background="@drawable/ic_scanning" /> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white"> <LinearLayout android:layout_width="match_parent" android:layout_height="220dp" android:background="@color/homeBackColor" android:gravity="center" android:orientation="vertical"> <ImageView android:id="@+id/userIconView" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center" /> <!--暂时不用--> <TextView android:id="@+id/userNameView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginVertical="10dp" android:textColor="@color/white" android:textSize="20sp" /> <TextView android:id="@+id/userDeptView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/userJobTextColor" /> </LinearLayout> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginHorizontal="15dp" android:layout_marginTop="170dp" android:layout_marginBottom="15dp" android:elevation="10dp" app:cardCornerRadius="5dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/homeRecyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" android:scrollbars="vertical" /> </RelativeLayout> </androidx.cardview.widget.CardView> </RelativeLayout> </LinearLayout>