From 82e57df230ecb744af6c8865f80870ba03c86d89 Mon Sep 17 00:00:00 2001
From: Linjiajia <319408893@qq.com>
Date: 星期二, 25 七月 2023 22:18:27 +0800
Subject: [PATCH] 基本功能完成

---
 app/src/main/res/layout/item_home_member_list.xml |  342 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 183 insertions(+), 159 deletions(-)

diff --git a/app/src/main/res/layout/item_home_member_list.xml b/app/src/main/res/layout/item_home_member_list.xml
index 54d0ff7..eb438d0 100644
--- a/app/src/main/res/layout/item_home_member_list.xml
+++ b/app/src/main/res/layout/item_home_member_list.xml
@@ -21,6 +21,7 @@
             app:cardCornerRadius="@dimen/dp_10"
             app:cardBackgroundColor="@color/color_card_pink"
             app:cardElevation="0dp"
+            tools:layout_height="wrap_content"
             >
             <LinearLayout
                 android:layout_width="match_parent"
@@ -30,52 +31,86 @@
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/layout_title"
                     android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_40"
+                    android:layout_height="40dp"
                     android:gravity="center_vertical">
 
-                    <TextView
-                        android:id="@+id/textView2"
-                        android:layout_width="wrap_content"
+                    <androidx.appcompat.widget.AppCompatTextView
+                        android:id="@+id/textView1"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
-                        android:layout_marginStart="24dp"
-                        android:text="@{bean.generation}"
+                        android:layout_marginStart="20dp"
+                        android:text="@{`绗� `+bean.identity+` 浠}"
                         android:textColor="@color/black"
-                        android:textSize="@dimen/sp_16"
-                        android:textStyle="bold"
+                        android:textSize="16sp"
+                        android:gravity="start|center_vertical"
                         app:layout_constraintBottom_toBottomOf="parent"
                         app:layout_constraintStart_toStartOf="parent"
                         app:layout_constraintTop_toTopOf="parent"
-                        tools:text="绗竴浠�" />
+                        app:layout_constraintEnd_toStartOf="@id/textView2"
+                        app:layout_constraintHorizontal_weight="1.5"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        app:autoSizeTextType="uniform"
+                        app:autoSizeMaxTextSize="16sp"
+                        app:autoSizeMinTextSize="12sp"
+                        app:layout_constraintHorizontal_chainStyle="spread_inside"
+                        tools:text="绗竴浠�"
+                        android:visibility="@{bean.isMyFamily==1?1:2}"
+                        />
 
-                    <TextView
-                        android:layout_width="wrap_content"
+                    <androidx.appcompat.widget.AppCompatTextView
+                        android:id="@+id/textView2"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_centerInParent="true"
                         android:gravity="center"
-                        android:text="@{bean.name}"
-                        android:textColor="@color/black"
-                        android:textSize="@dimen/sp_16"
-                        android:textStyle="bold"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintEnd_toEndOf="parent"
-                        app:layout_constraintHorizontal_bias="0.55"
-                        app:layout_constraintStart_toStartOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        tools:text="寮犱笁" />
-
-                    <TextView
-                        android:id="@+id/tv_time"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="@{bean.gender}"
+                        android:text="@{bean.nickName}"
                         android:textColor="@color/black"
                         android:textSize="16sp"
-                        android:layout_marginEnd="20dp"
-                        android:textStyle="bold"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintEnd_toStartOf="@+id/tv_time"
+                        app:layout_constraintStart_toEndOf="@+id/textView1"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintHorizontal_weight="2"
+                        android:layout_marginHorizontal="20dp"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        app:autoSizeTextType="uniform"
+                        app:autoSizeMaxTextSize="16sp"
+                        app:autoSizeMinTextSize="12sp"
+                        tools:text="寮犱笁" />
+
+                    <androidx.appcompat.widget.AppCompatTextView
+                        android:id="@+id/tv_time"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:text="@{bean.sex}"
+                        android:textColor="@color/black"
+                        android:textSize="16sp"
+                        android:layout_marginEnd="10dp"
+                        android:gravity="center_vertical|center"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintEnd_toStartOf="@id/iv_fold"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintStart_toEndOf="@id/textView2"
+                        app:layout_constraintHorizontal_weight="2"
+                        android:maxLines="1"
+                        android:ellipsize="end"
+                        app:autoSizeTextType="uniform"
+                        app:autoSizeMaxTextSize="16sp"
+                        app:autoSizeMinTextSize="12sp"
+                        tools:text="鐢�"
+                        />
+                    <ImageView
+                        android:id="@+id/iv_fold"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/ic_fold"
+                        app:layout_constraintTop_toTopOf="parent"
                         app:layout_constraintBottom_toBottomOf="parent"
                         app:layout_constraintEnd_toEndOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        tools:text="鐢�" />
+                        android:layout_marginEnd="10dp"
+                        />
 
                 </androidx.constraintlayout.widget.ConstraintLayout>
 
@@ -87,142 +122,131 @@
                     android:paddingStart="@dimen/dp_24"
                     android:paddingVertical="13dp"
                     >
+                    <LinearLayout
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        app:layout_constraintStart_toEndOf="@+id/imageFilterView"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/imageFilterView"
+                        app:layout_constraintBottom_toBottomOf="@+id/imageFilterView"
+                        >
+                        <LinearLayout
+                            android:id="@+id/linearLayout4"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            >
 
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鍑虹敓鏃ユ湡 锛�"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@{bean.birth}"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp"
+                                tools:text="2021-01-01" />
+                        </LinearLayout>
+                        <LinearLayout
+                            android:id="@+id/linearLayout5"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="5dp"
+                            >
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鍏ㄧ敓鍛藉懆鏈� 锛�"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@{bean.deadDay == null ? `鈥� 鈥擿 : bean.deadDay}"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp"
+                                tools:text="2021-01-01" />
+                        </LinearLayout>
+                        <LinearLayout
+                            android:id="@+id/linearLayout6"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="5dp"
+                            >
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鎵嬫満鍙� 锛� "
+                                android:textColor="#FF000000"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@{bean.phoneNumber}"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp"
+                                tools:text="12345678901" />
+                        </LinearLayout>
+                        <LinearLayout
+                            android:id="@+id/linearLayout7"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="5dp"
+                            >
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鎵�鍦ㄥ崟浣� 锛� "
+                                android:textColor="#FF000000"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@{bean.unit}"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp"
+                                tools:text="寮犳皬鍏徃" />
+                        </LinearLayout>
+                        <LinearLayout
+                            android:id="@+id/linearLayout8"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="5dp"
+                            >
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="閰嶅伓 锛� "
+                                android:textColor="#FF000000"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@{bean.spouseName}"
+                                android:textColor="#FF000000"
+                                android:textSize="12sp"
+                                tools:text="寮犱笁" />
+                        </LinearLayout>
+                    </LinearLayout>
                     <androidx.constraintlayout.utils.widget.ImageFilterView
-                        android:id="@+id/imageFilterView2"
+                        android:id="@+id/imageFilterView"
                         android:layout_width="100dp"
                         android:layout_height="100dp"
                         android:background="@color/teal_200"
-                        app:imageUrl="@{bean.url}"
+                        app:imageUrl="@{bean.img}"
                         app:layout_constraintStart_toStartOf="parent"
                         app:layout_constraintTop_toTopOf="parent"
                         app:round="20dp" />
-
-                    <LinearLayout
-                        android:id="@+id/linearLayout4"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintEnd_toEndOf="parent"
-                        app:layout_constraintStart_toEndOf="@+id/imageFilterView2"
-                        app:layout_constraintTop_toTopOf="@+id/imageFilterView2"
-                        app:layout_constraintBottom_toTopOf="@id/linearLayout5"
-                        app:layout_constraintVertical_chainStyle="spread_inside"
-                        >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="鍑虹敓鏃ユ湡 锛�"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{bean.birthday}"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp"
-                            tools:text="2021-01-01" />
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:id="@+id/linearLayout5"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintStart_toStartOf="@+id/linearLayout4"
-                        app:layout_constraintTop_toBottomOf="@+id/linearLayout4"
-                        app:layout_constraintBottom_toTopOf="@id/linearLayout6"
-                        >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="鍘讳笘鏃堕棿 锛�"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{bean.deathDay}"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp"
-                            tools:text="2021-01-01" />
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:id="@+id/linearLayout6"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintStart_toStartOf="@+id/linearLayout4"
-                        app:layout_constraintTop_toBottomOf="@+id/linearLayout5"
-                        app:layout_constraintBottom_toTopOf="@id/linearLayout7"
-                        >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="鎵嬫満鍙� 锛� "
-                            android:textColor="#FF000000"
-                            android:textSize="12sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{bean.phone}"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp"
-                            tools:text="12345678901" />
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:id="@+id/linearLayout7"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintStart_toStartOf="@+id/linearLayout4"
-                        app:layout_constraintTop_toBottomOf="@+id/linearLayout6"
-                        app:layout_constraintBottom_toTopOf="@id/linearLayout8"
-                        >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="鎵�鍦ㄥ崟浣� 锛� "
-                            android:textColor="#FF000000"
-                            android:textSize="12sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{bean.company}"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp"
-                            tools:text="寮犳皬鍏徃" />
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:id="@+id/linearLayout8"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintBottom_toBottomOf="@+id/imageFilterView2"
-                        app:layout_constraintStart_toStartOf="@+id/linearLayout4"
-                        app:layout_constraintTop_toBottomOf="@+id/linearLayout7">
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="閰嶅伓 锛� "
-                            android:textColor="#FF000000"
-                            android:textSize="12sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{bean.spouse}"
-                            android:textColor="#FF000000"
-                            android:textSize="12sp"
-                            tools:text="寮犱笁" />
-                    </LinearLayout>
 
                 </androidx.constraintlayout.widget.ConstraintLayout>
             </LinearLayout>

--
Gitblit v1.9.1