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_home_devices_detail.xml | 97 +++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 86 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/layout/activity_home_devices_detail.xml b/app/src/main/res/layout/activity_home_devices_detail.xml index 1324ff9..af40a90 100644 --- a/app/src/main/res/layout/activity_home_devices_detail.xml +++ b/app/src/main/res/layout/activity_home_devices_detail.xml @@ -17,10 +17,28 @@ android:orientation="vertical"> <com.android.app_base.widget.ExtendTitleBar + android:id="@+id/titleBar" android:layout_width="match_parent" android:layout_height="wrap_content" + app:title="@{viewModel.beanLiveData.id!=0?viewModel.beanLiveData.name:`娣诲姞璁惧`}" app:titleGravity="left" - /> + > + <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" @@ -31,6 +49,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:paddingHorizontal="20dp" + android:paddingBottom="20dp" > <TextView android:layout_width="wrap_content" @@ -45,12 +64,14 @@ <EditText android:layout_width="match_parent" android:layout_height="wrap_content" - android:inputType="text" + android:inputType="textMultiLine" android:autofillHints="creditCardNumber" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヨ澶囧悕绉癭:``}" android:textColor="#DE000000" android:textSize="16sp" android:text="@={viewModel.beanLiveData.name}" + android:enabled="@{viewModel.typeLiveData}" /> <TextView @@ -63,13 +84,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:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃堕棿`:``}" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.createDate}" - android:textSize="16sp" /> + 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" @@ -82,11 +109,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" - android:inputType="text" + android:inputType="textMultiLine" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヨ喘涔颁汉`:``}" android:text="@={viewModel.beanLiveData.buyer}" android:textColor="#DE000000" - android:textSize="16sp" /> + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + /> <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" @@ -99,11 +129,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" - android:inputType="text" + android:inputType="textMultiLine" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヤ簨椤瑰唴瀹筦:``}" android:textColor="#DE000000" android:text="@={viewModel.beanLiveData.content}" - android:textSize="16sp" /> + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + /> <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" @@ -118,9 +151,12 @@ android:layout_marginTop="2dp" android:inputType="text" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ瓨鏀惧湴鐐筦:``}" android:textColor="#DE000000" android:text="@={viewModel.beanLiveData.location}" - android:textSize="16sp" /> + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + /> <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" @@ -133,11 +169,50 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" - android:inputType="text" + android:inputType="textMultiLine" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ娉╜:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" android:text="@={viewModel.beanLiveData.remark}" - android:textSize="16sp" /> + android:textSize="16sp" + android:enabled="@{viewModel.typeLiveData}" + /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:gravity="center_vertical" + > + <TextView + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:text="澶囧繕鏈�" + android:textColor="#FF000000" + android:textSize="20sp" + /> + <ImageView + android:id="@+id/iv_add_memo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/ic_tourism_add" + android:layout_marginEnd="15dp" + android:visibility="@{viewModel.typeLiveData}" + /> + </LinearLayout> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + > + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/rv_memo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:listitem="@layout/item_memo" + tools:itemCount="2" + /> + </RelativeLayout> <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" -- Gitblit v1.9.1