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_income_and_expenses_detail.xml | 64 ++++++++++++++++++++++++++----- 1 files changed, 53 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/layout/activity_income_and_expenses_detail.xml b/app/src/main/res/layout/activity_income_and_expenses_detail.xml index ae9cbae..06f04d4 100644 --- a/app/src/main/res/layout/activity_income_and_expenses_detail.xml +++ b/app/src/main/res/layout/activity_income_and_expenses_detail.xml @@ -16,10 +16,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="瀹跺涵鏀舵敮鍙拌处" - app:titleGravity="left" /> + 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" @@ -27,7 +45,7 @@ > <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="vertical" android:paddingHorizontal="20dp" android:paddingBottom="20dp" @@ -36,7 +54,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" /> @@ -48,9 +66,11 @@ android:inputType="text" android:autofillHints="creditCardNumber" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ彴璐:``}" android:textColor="#DE000000" android:textSize="16sp" - android:text="@{viewModel.beanLiveData.type==0?`鍩洪噾`:`鍙拌处`}" + android:enabled="@{viewModel.typeLiveData}" + android:text="@={viewModel.beanLiveData.type}" /> <TextView @@ -63,12 +83,18 @@ /> <EditText + android:id="@+id/et_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:inputType="text" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏃堕棿`:``}" + android:textColorHint="#6b000000" android:textColor="#DE000000" - android:text="@={viewModel.beanLiveData.createTime}" + android:backgroundTint="#6B000000" + app:isEditable="@{false}" + android:clickable="@{viewModel.typeLiveData}" + android:text="@={viewModel.beanLiveData.happenTime}" android:textSize="16sp" /> <TextView android:layout_width="wrap_content" @@ -78,15 +104,21 @@ android:textColor="#767375" android:textSize="12sp" /> + <EditText + android:id="@+id/et_price" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" - android:inputType="text" - android:textColorHint="#6b000000" - android:text="@{viewModel.beanLiveData.price}" + android:hint="@{viewModel.typeLiveData?`璇烽�夋嫨鏀跺叆/鏀嚭`:``}" + android:text="@={viewModel.beanLiveData.price}" android:textColor="#DE000000" + android:textColorHint="#6b000000" + android:backgroundTint="#6B000000" + app:isEditable="@{false}" + android:clickable="@{viewModel.typeLiveData}" android:textSize="16sp" /> + <TextView android:layout_width="wrap_content" android:layout_marginTop="10dp" @@ -101,7 +133,9 @@ android:layout_marginTop="2dp" android:inputType="text" android:textColorHint="#6b000000" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ョ敤閫擿:``}" android:textColor="#DE000000" + android:enabled="@{viewModel.typeLiveData}" android:text="@={viewModel.beanLiveData.useFor}" android:textSize="16sp" /> <TextView @@ -117,15 +151,17 @@ android:layout_height="wrap_content" android:layout_marginTop="2dp" android:inputType="text" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ヤ娇鐢ㄤ汉`:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" + android:enabled="@{viewModel.typeLiveData}" android:text="@={viewModel.beanLiveData.usePeople}" android:textSize="16sp" /> <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" /> @@ -134,15 +170,17 @@ android:layout_height="wrap_content" android:layout_marginTop="2dp" android:inputType="text" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ユ敮浠樻柟寮廯:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" - android:text="@{viewModel.beanLiveData.kind==0?`鐜伴噾`:`鑷姩鍒掓墸`}" + android:enabled="@{viewModel.typeLiveData}" + android:text="@={viewModel.beanLiveData.kind}" android:textSize="16sp" /> <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" /> @@ -151,8 +189,10 @@ android:layout_height="wrap_content" android:layout_marginTop="2dp" android:inputType="text" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ラ噾棰漙:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" + android:enabled="@{viewModel.typeLiveData}" android:text="@={viewModel.beanLiveData.balance}" android:textSize="16sp" /> <TextView @@ -168,8 +208,10 @@ android:layout_height="wrap_content" android:layout_marginTop="2dp" android:inputType="text" + android:hint="@{viewModel.typeLiveData?`璇疯緭鍏ュ娉╜:``}" android:textColorHint="#6b000000" android:textColor="#DE000000" + android:enabled="@{viewModel.typeLiveData}" android:text="@={viewModel.beanLiveData.remark}" android:textSize="16sp" /> <TextView -- Gitblit v1.9.1