From 8aa3165449dd2757e016bdc43cfd5d111cd4c7a6 Mon Sep 17 00:00:00 2001 From: 张钢 <floatgang@163.com> Date: 星期四, 12 九月 2024 14:54:06 +0800 Subject: [PATCH] 修改了家庭资产的显示问题 --- app/src/main/res/layout/activity_marriage.xml | 466 ++++++++++++++++++++++++--------------------------------- 1 files changed, 196 insertions(+), 270 deletions(-) diff --git a/app/src/main/res/layout/activity_marriage.xml b/app/src/main/res/layout/activity_marriage.xml index e984bc8..a5059e0 100644 --- a/app/src/main/res/layout/activity_marriage.xml +++ b/app/src/main/res/layout/activity_marriage.xml @@ -13,11 +13,11 @@ <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/color_normal_background" + android:background="?attr/pageBackgroundColor" > <com.android.app_base.widget.ExtendTitleBar - android:id="@+id/extendTitleBar" + android:id="@+id/titleBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="10dp" @@ -26,16 +26,18 @@ app:titleGravity="left" /> - <ScrollView + <androidx.core.widget.NestedScrollView + android:id="@+id/nestedScrollView" android:layout_width="match_parent" android:layout_height="0dp" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintTop_toBottomOf="@+id/extendTitleBar" + app:layout_constraintTop_toBottomOf="@id/titleBar" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" + android:paddingBottom="20dp" > <LinearLayout android:id="@+id/ll_basic_information" @@ -44,6 +46,7 @@ android:orientation="vertical" android:layout_marginHorizontal="20dp" android:layout_marginVertical="16dp" + android:visibility="gone" > <TextView android:layout_width="wrap_content" @@ -74,7 +77,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="寮犱笁" + android:text="@{viewModel.infoLiveData.name}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -104,7 +107,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="鐢�" + android:text="@{viewModel.infoLiveData.sex}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -139,7 +142,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="2010-01-01" + android:text="@{viewModel.infoLiveData.birthday}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -169,7 +172,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="姹夋棌" + android:text="@{viewModel.infoLiveData.nation}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -201,14 +204,18 @@ android:textSize="12sp" android:alpha="0.54" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="445222200110233318" + android:text="@{viewModel.infoLiveData.idNo}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" android:ellipsize="marquee" + android:maxLines="1" + app:autoSizeTextType="uniform" + app:autoSizeMaxTextSize="14sp" + app:autoSizeMinTextSize="12sp" /> <View android:layout_width="match_parent" @@ -232,13 +239,18 @@ android:textSize="12sp" android:alpha="0.54" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="17818824255" + android:text="@{viewModel.infoLiveData.phone}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" + android:ellipsize="marquee" + android:maxLines="1" + app:autoSizeTextType="uniform" + app:autoSizeMaxTextSize="14sp" + app:autoSizeMinTextSize="12sp" /> <View android:layout_width="match_parent" @@ -270,7 +282,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="宸插" + android:text="@{viewModel.infoLiveData.marryStatus}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -302,7 +314,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="2020-10" + android:text="@{viewModel.infoLiveData.marryTime}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -334,10 +346,10 @@ android:textSize="12sp" android:alpha="0.54" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="骞夸笢鐪佸箍宸炲競" + android:text="@{viewModel.infoLiveData.address}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -364,8 +376,10 @@ android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginHorizontal="14dp" + android:layout_marginTop="16dp" app:cardCornerRadius="10dp" app:cardElevation="3dp" + app:cardBackgroundColor="@color/white" tools:layout_height="wrap_content" > <LinearLayout @@ -374,7 +388,7 @@ android:orientation="vertical" android:layout_marginHorizontal="6dp" > - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/layout_title_spouse" android:layout_width="match_parent" android:layout_height="50dp" @@ -387,14 +401,20 @@ android:text="閰嶅伓鎯呭喌" android:textColor="@color/black" android:textSize="20sp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> <ImageView android:id="@+id/iv_spouse_fold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@{viewModel.isSpouseExpendedLiveData?@drawable/ic_unfold:@drawable/ic_fold}" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> - </LinearLayout> + </androidx.constraintlayout.widget.ConstraintLayout> <LinearLayout android:id="@+id/layout_content_spouse" android:layout_width="match_parent" @@ -405,6 +425,7 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginBottom="20dp" > <LinearLayout android:layout_width="0dp" @@ -425,7 +446,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="寮犱笁" + android:text="@{viewModel.infoLiveData.spouseName}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -457,7 +478,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="宸插" + android:text="@{viewModel.infoLiveData.spouseMarryStatus}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -475,7 +496,7 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="20dp" + android:layout_marginBottom="20dp" > <LinearLayout android:layout_width="0dp" @@ -496,7 +517,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="2010-01-01" + android:text="@{viewModel.infoLiveData.spouseBirthday}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -528,7 +549,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="骞夸笢鐪佸箍宸炲競" + android:text="@{viewModel.infoLiveData.spouseAddress}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -541,60 +562,13 @@ /> </LinearLayout> </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="20dp" - android:layout_marginBottom="10dp" - > - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="宸ヤ綔鍗曚綅" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="寮犳皬鍏徃" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - android:ellipsize="marquee" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:layout_marginStart="40dp" - > - </LinearLayout> - </LinearLayout> - </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> + <androidx.cardview.widget.CardView android:id="@+id/card_predecessor" android:layout_width="match_parent" @@ -603,6 +577,8 @@ android:layout_marginTop="10dp" app:cardCornerRadius="10dp" app:cardElevation="2dp" + app:cardBackgroundColor="@color/white" + tools:layout_height="wrap_content" > <LinearLayout android:layout_width="match_parent" @@ -610,7 +586,7 @@ android:orientation="vertical" android:layout_marginHorizontal="6dp" > - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/layout_title_predecessor" android:layout_width="match_parent" android:layout_height="50dp" @@ -621,209 +597,35 @@ android:layout_weight="1" android:layout_height="wrap_content" android:text="鍓嶄换" - android:textColor="@color/black" - android:textSize="20sp" + android:textColor="#CC000000" + android:textSize="18sp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> <ImageView android:id="@+id/iv_predecessor_fold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@{viewModel.isPredecessorExpendedLiveData?@drawable/ic_unfold:@drawable/ic_fold}" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> - </LinearLayout> - <LinearLayout + </androidx.constraintlayout.widget.ConstraintLayout> + <RelativeLayout android:id="@+id/layout_content_predecessor" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" > - <LinearLayout + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/rv_predecessor" android:layout_width="match_parent" android:layout_height="wrap_content" - > - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="濮撳悕" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="寮犱笁" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:layout_marginStart="40dp" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="濠氬Щ鐘跺喌" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="绂诲" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - android:drawableStart="@drawable/ic_radio_button" - android:drawablePadding="8dp" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="20dp" - > - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="鍑虹敓鏃ユ湡" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="2010-01-01" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:layout_marginStart="40dp" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="鎴风睄鍦板潃" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="骞夸笢鐪佸箍宸炲競" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="20dp" - android:layout_marginBottom="10dp" - > - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="宸ヤ綔鍗曚綅" - android:textColor="@color/black" - android:textSize="12sp" - android:alpha="0.54" - /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:text="寮犳皬鍏徃" - android:textColor="#DE000000" - android:textSize="14sp" - android:layout_marginTop="5dp" - android:ellipsize="marquee" - /> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#6B000000" - android:layout_marginTop="8dp" - /> - </LinearLayout> - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:layout_marginStart="40dp" - > - </LinearLayout> - </LinearLayout> - </LinearLayout> + tools:listitem="@layout/item_old_spouse" + tools:itemCount="3" + /> + </RelativeLayout> </LinearLayout> @@ -836,6 +638,8 @@ android:layout_marginTop="10dp" app:cardCornerRadius="10dp" app:cardElevation="2dp" + app:cardBackgroundColor="@color/white" + tools:layout_height="wrap_content" > <LinearLayout android:layout_width="match_parent" @@ -843,7 +647,7 @@ android:orientation="vertical" android:layout_marginHorizontal="6dp" > - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/layout_title_procreate" android:layout_width="match_parent" android:layout_height="50dp" @@ -856,20 +660,25 @@ android:text="鐢熻偛鎯呭喌" android:textColor="@color/black" android:textSize="20sp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> <ImageView android:id="@+id/iv_procreate_fold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@{viewModel.isProcreateExpendedLiveData?@drawable/ic_unfold:@drawable/ic_fold}" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> - </LinearLayout> + </androidx.constraintlayout.widget.ConstraintLayout> <LinearLayout android:id="@+id/layout_content_procreate" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - > <LinearLayout android:layout_width="match_parent" @@ -894,7 +703,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="宸茬敓鑲�" + android:text="@{viewModel.infoLiveData.bearStatus}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -941,7 +750,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="鏄�" + android:text="@{viewModel.infoLiveData.handbookStatus}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -989,7 +798,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="鏄�" + android:text="@{viewModel.infoLiveData.oneBorn}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -1023,7 +832,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" - android:text="2023-01-01" + android:text="@{viewModel.infoLiveData.oneBornTime}" android:textColor="#DE000000" android:textSize="14sp" android:layout_marginTop="5dp" @@ -1041,10 +850,127 @@ </LinearLayout> </androidx.cardview.widget.CardView> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="闇�澹版槑鐨勬儏鍐�" + android:textColor="@color/black" + android:textSize="18sp" + android:layout_marginStart="20dp" + android:paddingVertical="5dp" + android:paddingHorizontal="3dp" + android:background="@drawable/shape_fffad1e0_10_10_0_0" + android:layout_marginTop="12dp" + /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="20dp" + android:background="@drawable/shape_fffad1e0_stroke_0_10_10_10" + android:paddingHorizontal="16dp" + android:paddingVertical="10dp" + android:orientation="vertical" + > + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="16sp" + android:textColor="#FF131215" + android:text="@{viewModel.infoLiveData.notion}" + /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="16sp" + android:textColor="@color/black" + android:text="@{viewModel.infoLiveData.contentTime}" + android:layout_marginTop="12dp" + android:layout_gravity="end" + tools:text="" + /> + </LinearLayout> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="澶囨敞" + android:textColor="@color/black" + android:textSize="18sp" + android:layout_marginStart="20dp" + android:paddingVertical="3dp" + android:paddingHorizontal="5dp" + android:background="@drawable/shape_fffad1e0_10_10_0_0" + android:layout_marginTop="12dp" + /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="20dp" + android:background="@drawable/shape_fffad1e0_stroke_0_10_10_10" + android:paddingHorizontal="16dp" + android:paddingVertical="10dp" + android:orientation="vertical" + > + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="16sp" + android:textColor="#FF131215" + android:text="@{viewModel.infoLiveData.remark}" + /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="16sp" + android:textColor="@color/black" + android:text="@{viewModel.infoLiveData.remarkTime}" + android:layout_marginTop="12dp" + android:layout_gravity="end" + /> + </LinearLayout> + + </LinearLayout> - </ScrollView> + </androidx.core.widget.NestedScrollView> + <LinearLayout + android:id="@+id/layout_data_null" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center" + android:visibility="gone" + tools:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/titleBar"> + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/img_data_null" + /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="18dp" + android:text="绌虹┖濡備篃~" + android:textSize="14sp" + android:textColor="#73000000" + /> + </LinearLayout> + <androidx.constraintlayout.utils.widget.ImageFilterView + android:id="@+id/fab_move_to_top" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginEnd="25dp" + android:layout_marginBottom="44dp" + app:fabCustomSize="100dp" + android:background="@drawable/ic_move_to_top" + /> </androidx.constraintlayout.widget.ConstraintLayout> </layout> \ No newline at end of file -- Gitblit v1.9.1