From 31b7700b976a46901f67c5d7a00281ca4745fc9f Mon Sep 17 00:00:00 2001 From: Linjiajia <319408893@qq.com> Date: 星期六, 07 十月 2023 21:44:35 +0800 Subject: [PATCH] 调整旅游模块功能 --- app/src/main/res/layout/activity_tourism_detail.xml | 295 +++++++++++++++++++--------------------------------------- 1 files changed, 96 insertions(+), 199 deletions(-) diff --git a/app/src/main/res/layout/activity_tourism_detail.xml b/app/src/main/res/layout/activity_tourism_detail.xml index e806b06..016b005 100644 --- a/app/src/main/res/layout/activity_tourism_detail.xml +++ b/app/src/main/res/layout/activity_tourism_detail.xml @@ -19,7 +19,7 @@ android:id="@+id/title_bar" android:layout_width="match_parent" android:layout_height="wrap_content" - app:title="@{viewModel.beanLiveData.title==null?`鏂板鏃呮父璐圭敤璁板綍`:viewModel.beanLiveData.title}" + app:title="@{viewModel.beanLiveData.name==null?`鏂板鏃呮父璐圭敤璁板綍`:viewModel.beanLiveData.name}" app:titleGravity="left" > <FrameLayout @@ -52,7 +52,7 @@ android:layout_width="wrap_content" android:layout_marginTop="@dimen/dp_10" android:layout_height="@dimen/dp_20" - android:text="鏍囬" + android:text="鏃呮父鍚嶇О" android:textColor="#767375" android:textSize="12sp" /> @@ -63,11 +63,11 @@ android:layout_height="wrap_content" android:inputType="text" android:autofillHints="creditCardNumber" - android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ爣棰榒:``}" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ梾娓稿悕绉癭:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" android:textSize="16sp" - android:text="@={viewModel.beanLiveData.title}" + android:text="@={viewModel.beanLiveData.name}" android:enabled="@{viewModel.typeLiveData}" /> @@ -90,11 +90,8 @@ android:textColor="#DE000000" android:text="@={viewModel.beanLiveData.startTime}" android:textSize="16sp" - android:focusable="false" - android:cursorVisible="false" - android:longClickable="false" - android:clickable="@{viewModel.typeLiveData}" - android:backgroundTint="#6B000000" + app:isEditable="@{false}" + android:enabled="@{viewModel.typeLiveData}" /> <TextView android:layout_width="wrap_content" @@ -114,52 +111,92 @@ android:text="@={viewModel.beanLiveData.endTime}" android:textColor="#DE000000" android:textSize="16sp" - android:clickable="@{viewModel.typeLiveData}" - android:focusable="false" - android:cursorVisible="false" - android:longClickable="false" - android:backgroundTint="#6B000000" + android:enabled="@{viewModel.typeLiveData}" + app:isEditable="@{false}" /> <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" /> - <androidx.constraintlayout.widget.ConstraintLayout + <EditText + android:id="@+id/et_whereabouts" android:layout_width="match_parent" android:layout_height="wrap_content" - > - <EditText - android:id="@+id/et_total_day" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:inputType="number" - android:textColorHint="#6b000000" - android:hint="@{viewModel.typeLiveData?`0`:``}" - android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.totalDay}" - android:textSize="16sp" - android:enabled="false" - android:backgroundTint="#6B000000" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintStart_toStartOf="parent" - /> - <View - android:layout_width="0dp" - android:layout_height="0dp" - android:background="@color/color_non_editable" - app:layout_constraintTop_toTopOf="@id/et_total_day" - app:layout_constraintStart_toStartOf="@id/et_total_day" - app:layout_constraintBottom_toBottomOf="@id/et_total_day" - app:layout_constraintEnd_toEndOf="@id/et_total_day" - android:visibility="@{viewModel.typeLiveData}" - /> - </androidx.constraintlayout.widget.ConstraintLayout> - + android:layout_marginTop="2dp" + android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鍘诲悜`:``}" + android:text="@={viewModel.beanLiveData.destination}" + android:textColor="#DE000000" + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + app:isEditable="@{false}" + /> + <TextView + android:layout_width="wrap_content" + android:layout_marginTop="10dp" + android:layout_height="wrap_content" + android:text="鏃呮父鎬ц川" + android:textColor="#767375" + android:textSize="12sp" + /> + <EditText + android:id="@+id/et_tourism_nature" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃呮父鎬ц川`:``}" + android:text="@={viewModel.beanLiveData.property}" + android:textColor="#DE000000" + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + app:isEditable="@{false}" + /> + <TextView + android:layout_width="wrap_content" + android:layout_marginTop="10dp" + android:layout_height="wrap_content" + android:text="鏃呮父鏂瑰紡" + android:textColor="#767375" + android:textSize="12sp" + /> + <EditText + android:id="@+id/et_tourism_way" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃呮父鏂瑰紡`:``}" + android:text="@={viewModel.beanLiveData.manner}" + android:textColor="#DE000000" + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + app:isEditable="@{false}" + /> + <TextView + android:layout_width="wrap_content" + android:layout_marginTop="@dimen/dp_10" + android:layout_height="@dimen/dp_20" + android:text="鍥㈣垂" + android:textColor="#767375" + android:textSize="12sp" + /> + <EditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:autofillHints="creditCardNumber" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ洟璐筦:``}" + android:textColorHint="#6b000000" + android:textColor="#DE000000" + android:textSize="16sp" + android:text="@={viewModel.beanLiveData.groupTotal}" + android:enabled="@{viewModel.typeLiveData}" + android:inputType="numberDecimal" + /> <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" @@ -181,10 +218,9 @@ android:textColorHint="#6b000000" android:hint="@{viewModel.typeLiveData?`0`:``}" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.totalCost}" + android:text="@={viewModel.beanLiveData.totalPrice}" android:textSize="16sp" android:enabled="false" - android:backgroundTint="#6B000000" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -213,106 +249,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="鎬婚噾棰�" - android:textColor="#767375" - android:textSize="12sp" - /> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - > - <EditText - android:id="@+id/et_total_cost1" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="numberDecimal" - android:textColorHint="#6b000000" - android:textColor="#DE000000" - android:hint="@{viewModel.typeLiveData?`0`:``}" - android:text="@={viewModel.beanLiveData.totalCost}" - android:textSize="16sp" - android:enabled="false" - android:backgroundTint="#6B000000" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintStart_toStartOf="parent" - /> - <View - android:layout_width="0dp" - android:layout_height="0dp" - android:background="@color/color_non_editable" - app:layout_constraintTop_toTopOf="@id/et_total_cost1" - app:layout_constraintStart_toStartOf="@id/et_total_cost1" - app:layout_constraintBottom_toBottomOf="@id/et_total_cost1" - app:layout_constraintEnd_toEndOf="@id/et_total_cost1" - android:visibility="@{viewModel.typeLiveData}" - /> - </androidx.constraintlayout.widget.ConstraintLayout> - - - </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:text="椁愯垂" - android:textColor="#767375" - android:textSize="12sp" - /> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - > - <EditText - android:id="@+id/et_eat" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="numberDecimal" - android:textColorHint="#6b000000" - android:hint="@{viewModel.typeLiveData?`0`:``}" - android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.eat}" - android:textSize="16sp" - android:enabled="false" - android:backgroundTint="#6B000000" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintStart_toStartOf="parent" - /> - <View - android:layout_width="0dp" - android:layout_height="0dp" - android:background="@color/color_non_editable" - app:layout_constraintTop_toTopOf="@id/et_eat" - app:layout_constraintStart_toStartOf="@id/et_eat" - app:layout_constraintBottom_toBottomOf="@id/et_eat" - app:layout_constraintEnd_toEndOf="@id/et_eat" - android:visibility="@{viewModel.typeLiveData}" - /> - </androidx.constraintlayout.widget.ConstraintLayout> - - - </LinearLayout> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="12dp" - > - <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:text="浣忓" + android:text="鎬讳綇瀹胯垂" android:textColor="#767375" android:textSize="12sp" /> @@ -328,10 +265,9 @@ android:textColorHint="#6b000000" android:hint="@{viewModel.typeLiveData?`0`:``}" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.stay}" + android:text="@={viewModel.beanLiveData.stayTotal}" android:textSize="16sp" android:enabled="false" - android:backgroundTint="#6B000000" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -358,7 +294,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="浜ら��" + android:text="鎬讳氦閫氳垂" android:textColor="#767375" android:textSize="12sp" /> @@ -373,11 +309,10 @@ android:inputType="numberDecimal" android:textColorHint="#6b000000" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.traffic}" + android:text="@={viewModel.beanLiveData.travelTotal}" android:textSize="16sp" android:enabled="false" android:hint="@{viewModel.typeLiveData?`0`:``}" - android:backgroundTint="#6B000000" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -409,7 +344,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="闂ㄧエ" + android:text="鎬婚棬绁ㄨ垂" android:textColor="#767375" android:textSize="12sp" /> @@ -424,11 +359,10 @@ android:inputType="numberDecimal" android:textColorHint="#6b000000" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.entrance}" + android:text="@={viewModel.beanLiveData.entranceTotal}" android:textSize="16sp" android:hint="@{viewModel.typeLiveData?`0`:``}" android:enabled="false" - android:backgroundTint="#6B000000" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -455,7 +389,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="璐墿" + android:text="鎬婚璐�" android:textColor="#767375" android:textSize="12sp" /> @@ -464,17 +398,16 @@ android:layout_height="wrap_content" > <EditText - android:id="@+id/et_shopping" + android:id="@+id/et_eat" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="numberDecimal" android:textColorHint="#6b000000" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.shopping}" + android:text="@={viewModel.beanLiveData.eatTotal}" android:textSize="16sp" android:hint="@{viewModel.typeLiveData?`0`:``}" android:enabled="false" - android:backgroundTint="#6B000000" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -482,52 +415,16 @@ android:layout_width="0dp" android:layout_height="0dp" android:background="@color/color_non_editable" - app:layout_constraintTop_toTopOf="@id/et_shopping" - app:layout_constraintStart_toStartOf="@id/et_shopping" - app:layout_constraintBottom_toBottomOf="@id/et_shopping" - app:layout_constraintEnd_toEndOf="@id/et_shopping" + app:layout_constraintTop_toTopOf="@id/et_eat" + app:layout_constraintStart_toStartOf="@id/et_eat" + app:layout_constraintBottom_toBottomOf="@id/et_eat" + app:layout_constraintEnd_toEndOf="@id/et_eat" android:visibility="@{viewModel.typeLiveData}" /> </androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout> </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="14dp" - android:gravity="center_vertical" - > - <TextView - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="姣忔棩璇︾粏娑堣垂璁板綍" - android:textSize="20sp" - android:textColor="@color/black" - /> - <ImageView - android:id="@+id/iv_add_daily_consume_record" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="@{viewModel.typeLiveData?@drawable/ic_tourism_add:null}" - /> - - </LinearLayout> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="10dp" - > - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/rv_daily_consume_record" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - /> - </RelativeLayout> - - </LinearLayout> </ScrollView> -- Gitblit v1.9.1