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_annual_health_status_detail.xml |   99 +++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 78 insertions(+), 21 deletions(-)

diff --git a/app/src/main/res/layout/activity_annual_health_status_detail.xml b/app/src/main/res/layout/activity_annual_health_status_detail.xml
index 53366db..8413cc2 100644
--- a/app/src/main/res/layout/activity_annual_health_status_detail.xml
+++ b/app/src/main/res/layout/activity_annual_health_status_detail.xml
@@ -18,9 +18,25 @@
         <com.android.app_base.widget.ExtendTitleBar
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            app:title="骞村害鍋ュ悍鐘跺喌"
+            app:title="@{viewModel.beanLiveData.id==0?`鏂板缓骞村害鍋ュ悍鐘跺喌`:viewModel.beanLiveData.title}"
             app:titleGravity="left"
-            />
+            app:leftIcon="@drawable/ic_back"
+            >
+            <FrameLayout
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:layout_marginHorizontal="16dp"
+                android:layout_gravity="center_vertical|end"
+                >
+
+                <ImageView
+                    android:id="@+id/iv_operate"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:background="@{viewModel.typeLiveData?@drawable/ic_operate_finish:@drawable/ic_operate}" />
+            </FrameLayout>
+        </com.android.app_base.widget.ExtendTitleBar>
         <ScrollView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -41,17 +57,36 @@
                     android:textSize="12sp"
                     />
 
-
-                <EditText
+                <androidx.constraintlayout.widget.ConstraintLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:inputType="text"
-                    android:autofillHints="creditCardNumber"
-                    android:textColorHint="#6b000000"
-                    android:textColor="#DE000000"
-                    android:textSize="16sp"
-                    android:text="@{String.valueOf(viewModel.beanLiveData.id)}"
-                    />
+                    >
+                    <EditText
+                        android:id="@+id/et_id"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="text"
+                        android:textColorHint="#6b000000"
+                        android:textColor="#DE000000"
+                        android:textSize="16sp"
+                        android:text="@{viewModel.beanLiveData.id==0?`-1`:viewModel.beanLiveData.id+``}"
+                        android:enabled="false"
+                        android:src="@color/color_non_editable"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        />
+                    <View
+                        android:layout_width="0dp"
+                        android:layout_height="0dp"
+                        android:background="@color/color_non_editable"
+                        app:layout_constraintTop_toTopOf="@id/et_id"
+                        app:layout_constraintStart_toStartOf="@id/et_id"
+                        app:layout_constraintBottom_toBottomOf="@id/et_id"
+                        app:layout_constraintEnd_toEndOf="@id/et_id"
+                        android:visibility="@{viewModel.typeLiveData}"
+                        />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
 
                 <TextView
                     android:layout_width="wrap_content"
@@ -63,13 +98,20 @@
                     />
 
                 <EditText
+                    android:id="@+id/et_time"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="2dp"
                     android:inputType="text"
+                    android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃堕棿`:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.time}"
-                    android:textSize="16sp" />
+                    android:text="@={viewModel.beanLiveData.checkTime}"
+                    android:textSize="16sp"
+                    app:isEditable="@{false}"
+                    android:clickable="@{viewModel.typeLiveData}"
+
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -84,9 +126,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ョ被鍒玚:``}"
                     android:text="@={viewModel.beanLiveData.type}"
                     android:textColor="#DE000000"
-                    android:textSize="16sp" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -101,14 +146,17 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ氨鐥呭尰闄:``}"
                     android:textColor="#DE000000"
                     android:text="@={viewModel.beanLiveData.hospital}"
-                    android:textSize="16sp" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
                     android:layout_height="wrap_content"
-                    android:text="鎻愬悕"
+                    android:text="棰樺悕"
                     android:textColor="#767375"
                     android:textSize="12sp"
                     />
@@ -118,9 +166,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ラ鍚峘:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.name}"
-                    android:textSize="16sp" />
+                    android:text="@={viewModel.beanLiveData.title}"
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -135,9 +186,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ敞鎰忎簨椤筦:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.attention}"
-                    android:textSize="16sp" />
+                    android:text="@={viewModel.beanLiveData.notice}"
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -152,9 +206,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ娉╜:``}"
                     android:textColor="#DE000000"
                     android:text="@={viewModel.beanLiveData.remark}"
-                    android:textSize="16sp" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"

--
Gitblit v1.9.1