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/acitivity_tourism_experience_detail.xml |   72 +++++++++++++++++++++++++++++-------
 1 files changed, 58 insertions(+), 14 deletions(-)

diff --git a/app/src/main/res/layout/acitivity_tourism_experience_detail.xml b/app/src/main/res/layout/acitivity_tourism_experience_detail.xml
index 5a040a8..67134bc 100644
--- a/app/src/main/res/layout/acitivity_tourism_experience_detail.xml
+++ b/app/src/main/res/layout/acitivity_tourism_experience_detail.xml
@@ -4,6 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools">
 
     <data>
+        <import type="android.text.TextUtils"/>
         <variable
             name="viewModel"
             type="com.application.zhangshi_app_android.ui.function.TourismExperienceDetailActivityViewModel" />
@@ -18,9 +19,25 @@
         <com.android.app_base.widget.ExtendTitleBar
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            app:title="@{viewModel.beanLiveData.title}"
+            app:title="@{TextUtils.isEmpty(viewModel.beanLiveData.title)?`鏂板缓鏃呮父缁忓巻`: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"
@@ -48,9 +65,11 @@
                     android:inputType="text"
                     android:autofillHints="creditCardNumber"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ爣棰榒:``}"
                     android:textColor="#DE000000"
                     android:textSize="16sp"
                     android:text="@={viewModel.beanLiveData.title}"
+                    android:enabled="@{viewModel.typeLiveData}"
                     />
 
                 <TextView
@@ -63,13 +82,19 @@
                     />
 
                 <EditText
+                    android:id="@+id/et_time"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.time}"
-                    android:textSize="16sp" />
+                    android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃堕棿`:``}"
+                    android:text="@={viewModel.beanLiveData.happenTime}"
+                    android:textSize="16sp"
+                    android:clickable="@{viewModel.typeLiveData}"
+                    app:isEditable="@{false}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -84,9 +109,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ湴鐐筦:``}"
                     android:text="@={viewModel.beanLiveData.address}"
                     android:textColor="#DE000000"
-                    android:textSize="16sp" />
+                    android:enabled="@{viewModel.typeLiveData}"
+                    android:textSize="16sp"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -101,9 +129,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヤ汉鐗ー:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.person}"
-                    android:textSize="16sp" />
+                    android:text="@={viewModel.beanLiveData.people}"
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -118,9 +149,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ梾鏈焋:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.travelTime}"
-                    android:textSize="16sp" />
+                    android:text="@={viewModel.beanLiveData.travelPeriod}"
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -135,9 +169,12 @@
                     android:layout_marginTop="2dp"
                     android:inputType="text"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ寔璇佹梾娓竊:``}"
                     android:textColor="#DE000000"
                     android:text="@={viewModel.beanLiveData.certificate}"
-                    android:textSize="16sp" />
+                    android:textSize="16sp"
+                    android:enabled="@{viewModel.typeLiveData}"
+                    />
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_marginTop="10dp"
@@ -150,10 +187,11 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="2dp"
-                    android:inputType="text"
+                    android:inputType="numberDecimal"
                     android:textColorHint="#6b000000"
+                    android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヨ垂鐢╜:``}"
                     android:textColor="#DE000000"
-                    android:text="@={viewModel.beanLiveData.cost}"
+                    android:text="@={viewModel.beanLiveData.totalPrice}"
                     android:textSize="16sp" />
                 <TextView
                     android:layout_width="wrap_content"
@@ -164,6 +202,7 @@
                     android:textSize="12sp"
                     />
                 <EditText
+                    android:id="@+id/et_self"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="2dp"
@@ -172,8 +211,10 @@
                     android:textColor="#DE000000"
                     tools:text="鑷垂"
                     android:drawablePadding="10dp"
+                    app:isEditable="@{false}"
+                    android:clickable="@{viewModel.typeLiveData}"
                     android:drawableStart="@drawable/ic_radio_button_selected"
-                    android:text="@{viewModel.beanLiveData.free==1?`鍏垂`:`鑷垂`}"
+                    android:text="@{viewModel.beanLiveData.self==0?`鍏垂`:`鑷垂`}"
                     android:textSize="16sp" />
                 <TextView
                     android:layout_width="wrap_content"
@@ -189,9 +230,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