結對沖刺作業3

新晋软工小白發表於2024-06-11

實現查詢使用者介面

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     xmlns:app="http://schemas.android.com/apk/res-auto"
 4     xmlns:tools="http://schemas.android.com/tools"
 5     android:layout_width="match_parent"
 6     android:layout_height="match_parent"
 7     android:animateLayoutChanges="true"
 8     android:background="@color/primary"
 9     tools:context=".activities.UsersActivity">
10 
11     <androidx.appcompat.widget.AppCompatImageView
12         android:id="@+id/imageBack"
13         android:layout_width="@dimen/_30sdp"
14         android:layout_height="@dimen/_30sdp"
15         android:layout_marginStart="@dimen/_16sdp"
16         android:layout_marginLeft="@dimen/_16sdp"
17         android:layout_marginTop="@dimen/_12sdp"
18         android:background="@drawable/background_icon"
19         android:padding="@dimen/_6sdp"
20         android:src="@drawable/ic_back"
21         app:layout_constraintStart_toStartOf="parent"
22         app:layout_constraintTop_toTopOf="parent"
23         app:tint="@color/white"/>
24 
25     <TextView
26         android:layout_width="wrap_content"
27         android:layout_height="wrap_content"
28         android:text="@string/select_user"
29         android:textColor="@color/white"
30         android:textSize="@dimen/_14ssp"
31         android:textStyle="bold"
32         app:layout_constraintBottom_toBottomOf="@+id/imageBack"
33         app:layout_constraintEnd_toEndOf="parent"
34         app:layout_constraintStart_toStartOf="parent"
35         app:layout_constraintTop_toTopOf="@+id/imageBack" />
36 
37     <FrameLayout
38         android:layout_width="match_parent"
39         android:layout_height="0dp"
40         android:layout_marginTop="@dimen/_16sdp"
41         android:background="@drawable/background_content_bottom"
42         app:layout_constraintBottom_toBottomOf="parent"
43         app:layout_constraintTop_toBottomOf="@+id/imageBack">
44 
45         <androidx.recyclerview.widget.RecyclerView
46             android:id="@+id/userRecyclerView"
47             android:layout_width="match_parent"
48             android:layout_height="match_parent"
49             android:clipToPadding="false"
50             android:orientation="vertical"
51             android:overScrollMode="never"
52             android:padding="@dimen/_20sdp"
53             android:visibility="gone"
54             app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
55 
56         <ProgressBar
57             android:id="@+id/progressBar"
58             android:layout_width="@dimen/_25sdp"
59             android:layout_height="@dimen/_25sdp"
60             android:layout_gravity="center" />
61 
62         <TextView
63             android:id="@+id/textErrorMessage"
64             android:layout_width="match_parent"
65             android:layout_height="wrap_content"
66             android:layout_gravity="center"
67             android:layout_marginStart="@dimen/_24sdp"
68             android:layout_marginEnd="@dimen/_24sdp"
69             android:gravity="center"
70             android:textColor="@color/error"
71             android:textSize="@dimen/_12ssp"
72             android:visibility="gone" />
73 
74     </FrameLayout>
75 
76 </androidx.constraintlayout.widget.ConstraintLayout>

相關文章