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/activity_family_memorabilia_detail.xml |  127 ++++++++++++++++++-----------------------
 1 files changed, 56 insertions(+), 71 deletions(-)

diff --git a/app/src/main/res/layout/activity_family_memorabilia_create.xml b/app/src/main/res/layout/activity_family_memorabilia_detail.xml
similarity index 66%
rename from app/src/main/res/layout/activity_family_memorabilia_create.xml
rename to app/src/main/res/layout/activity_family_memorabilia_detail.xml
index b48456f..790056b 100644
--- a/app/src/main/res/layout/activity_family_memorabilia_create.xml
+++ b/app/src/main/res/layout/activity_family_memorabilia_detail.xml
@@ -6,34 +6,22 @@
     <data>
         <variable
             name="viewModel"
-            type="com.application.zhangshi_app_android.ui.function.CreateFamilyProjectActivityViewModel" />
+            type="com.application.zhangshi_app_android.ui.function.FamilyMemorabiliaDetailActivityViewModel" />
     </data>
 
     <LinearLayout
-        tools:context=".ui.function.CreateFamilyProjectActivity"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/color_normal_background"
         android:orientation="vertical">
 
-        <com.hjq.bar.TitleBar
+        <com.android.app_base.widget.ExtendTitleBar
             android:id="@+id/titleBar"
             android:layout_width="match_parent"
-            android:layout_height="?attr/actionBarSize"
-            app:layout_constraintTop_toTopOf="parent"
-            android:paddingHorizontal="0dp"
-            android:background="@color/color_title_bar_background"
-            app:leftIcon="@null"
-            app:rightIcon="@null"
+            android:layout_height="wrap_content"
+            app:title="@{viewModel.beanMutableLiveData.id==0?`鏂板瀹跺ぇ浜嬭`:viewModel.beanMutableLiveData.title}"
+            app:titleGravity="left"
             >
-            <ImageView
-                android:id="@+id/iv_menu"
-                android:layout_width="24dp"
-                android:layout_height="24dp"
-                android:layout_marginHorizontal="16dp"
-                android:background="@drawable/ic_menu"
-                android:layout_gravity="center_vertical"
-                />
             <FrameLayout
                 android:layout_width="24dp"
                 android:layout_height="24dp"
@@ -48,35 +36,16 @@
                     android:background="@{viewModel.typeLiveData?@drawable/ic_operate_finish:@drawable/ic_operate}"
                     />
             </FrameLayout>
+        </com.android.app_base.widget.ExtendTitleBar>
 
-            <LinearLayout
-                android:id="@+id/layout_default"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginHorizontal="56dp"
-                android:gravity="center_vertical"
-                >
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="16dp"
-                    android:text="寮犳皬APP绔嬮」"
-                    android:layout_weight="1"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/sp_20"
-                    />
-            </LinearLayout>
-
-
-        </com.hjq.bar.TitleBar>
-        <ScrollView
+        <androidx.core.widget.NestedScrollView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             app:layout_constraintTop_toBottomOf="@id/titleBar"
             >
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:orientation="vertical"
                 android:paddingHorizontal="20dp"
                 >
@@ -87,7 +56,7 @@
                     android:layout_height="@dimen/dp_20"
                     android:text="鏍囬"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
 
 
@@ -95,13 +64,13 @@
                     android:id="@+id/editTextsequence"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:hint="璇疯緭鍏ユ爣棰�"
                     android:inputType="text"
-                    android:autofillHints="creditCardNumber"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ爣棰榒:``}"
                     android:textColorHint="#6b000000"
                     android:textColor="#DE000000"
-                    android:textSize="@dimen/sp_16"
+                    android:textSize="16sp"
                     android:text="@={viewModel.beanMutableLiveData.title}"
+                    android:enabled="@{viewModel.typeLiveData}"
                     />
 
                 <TextView
@@ -111,20 +80,24 @@
                     android:layout_height="wrap_content"
                     android:text="鏃堕棿"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
 
                 <EditText
-                    android:id="@+id/editTextTime"
+                    android:id="@+id/et_time"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="@dimen/dp_2"
-                    android:hint="璇疯緭鍏ユ椂闂�(鏍煎紡锛�2001-01-01)"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ椂闂�(鏍煎紡锛�2001-01-01)`:``}"
                     android:inputType="text"
-                    android:textColorHint="#6b000000"
+                    android:text="@={viewModel.beanMutableLiveData.happenTime}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanMutableLiveData.createTime}"
-                    android:textSize="@dimen/sp_16" />
+                    android:textColorHint="#6b000000"
+                    android:textSize="16sp"
+                    android:clickable="@{viewModel.typeLiveData}"
+                    app:isEditable="@{false}"
+                    />
+
                 <TextView
                     android:id="@+id/textview_figure_1"
                     android:layout_width="wrap_content"
@@ -132,7 +105,7 @@
                     android:layout_height="wrap_content"
                     android:text="浜虹墿"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
 
 
@@ -141,12 +114,14 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="@dimen/dp_2"
-                    android:hint="璇疯緭鍏ヤ汉鐗�"
                     android:inputType="text"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヤ汉鐗ー:``}"
                     android:textColorHint="#6b000000"
                     android:text="@={viewModel.beanMutableLiveData.people}"
                     android:textColor="#DE000000"
-                    android:textSize="@dimen/sp_16" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:id="@+id/textview_spot"
                     android:layout_width="wrap_content"
@@ -154,7 +129,7 @@
                     android:layout_height="@dimen/dp_20"
                     android:text="鍦扮偣"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
 
 
@@ -162,13 +137,14 @@
                     android:id="@+id/editTextSpot"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/dp_2"
-                    android:hint="璇疯緭鍏ュ湴鐐�"
                     android:inputType="text"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ湴鐐筦:``}"
                     android:textColorHint="#6b000000"
                     android:textColor="#DE000000"
                     android:text="@={viewModel.beanMutableLiveData.address}"
-                    android:textSize="@dimen/sp_16" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:id="@+id/textview_figure_2"
                     android:layout_width="wrap_content"
@@ -176,7 +152,7 @@
                     android:layout_height="wrap_content"
                     android:text="澶囨敞"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
 
 
@@ -185,12 +161,14 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="@dimen/dp_2"
-                    android:hint="璇疯緭鍏ュ娉�"
                     android:inputType="text"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ娉╜:``}"
                     android:textColorHint="#6b000000"
                     android:textColor="#DE000000"
                     android:text="@={viewModel.beanMutableLiveData.remark}"
-                    android:textSize="@dimen/sp_16" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:id="@+id/textview_elecfile"
                     android:layout_width="wrap_content"
@@ -198,23 +176,30 @@
                     android:layout_height="wrap_content"
                     android:text="鐢靛瓙鏂囦欢"
                     android:textColor="#ff000000"
-                    android:textSize="@dimen/sp_12"
+                    android:textSize="12sp"
                     />
-                <com.android.app_base.widget.WrapRecyclerView
-                    android:id="@+id/rv_image"
-                    android:orientation="vertical"
+                <RelativeLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:background="@drawable/shape_6b0000_stroke"
-                    android:layout_marginBottom="20dp"
-                    android:layout_marginTop="@dimen/dp_2"
-                    android:paddingStart="10dp"
-                    android:paddingEnd="5dp"
-                    android:paddingVertical="10dp"
-                    />
+                    >
+                    <com.android.app_base.widget.WrapRecyclerView
+                        android:id="@+id/rv_image"
+                        android:orientation="vertical"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/shape_6b0000_stroke"
+                        android:layout_marginBottom="20dp"
+                        android:layout_marginTop="2dp"
+                        android:paddingStart="10dp"
+                        android:paddingEnd="5dp"
+                        android:paddingVertical="10dp"
+                        tools:itemCount="30"
+                        />
+
+                </RelativeLayout>
 
             </LinearLayout>
-        </ScrollView>
+        </androidx.core.widget.NestedScrollView>
 
 
     </LinearLayout>

--
Gitblit v1.9.1