From 4f7f99c6ea914bcd38de78bd8371be566026b905 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期三, 26 二月 2025 15:54:14 +0800 Subject: [PATCH] -为按钮和列表项添加波纹效果,以获得更好的视觉反馈 -改进MapFragment中的底部布局动画 -在MapFragment中添加设备状态和RTU地址显示 -更新BaseListResult以支持泛型类型 -为设备数据添加IntakeListResult和IntakeResult -通过数据库支持增强标记位置更新功能 -添加电话拨号意图以分隔标记详细信息 -通过过期检查改进磁贴缓存 -添加问题报告的确认对话框 -更新登录活动以限制用户名长度 -为波纹效果和UI元素添加新颜色 -重构XML布局以使用新的波纹图 -改进MapFragment中的错误处理和用户反馈 --- app/src/main/res/layout/activity_order_detail.xml | 585 ++++++++++++++++++++++++++++++++------------------------- 1 files changed, 328 insertions(+), 257 deletions(-) diff --git a/app/src/main/res/layout/activity_order_detail.xml b/app/src/main/res/layout/activity_order_detail.xml index 613ac31..7e2fe15 100644 --- a/app/src/main/res/layout/activity_order_detail.xml +++ b/app/src/main/res/layout/activity_order_detail.xml @@ -11,11 +11,16 @@ <variable name="data" type="com.dayu.pipirrapp.bean.net.OrderDetailResult" /> + + <variable + name="dealData" + type="com.dayu.pipirrapp.bean.net.DealDetailResult" /> </data> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/item_bg_color" android:orientation="vertical"> <include @@ -27,268 +32,215 @@ android:id="@+id/ScrollView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@+id/title"> + android:layout_above="@+id/deal_button" + android:layout_below="@+id/title" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - android:padding="20dp"> - - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="30dp" - android:orientation="horizontal"> - - <ImageView - android:id="@+id/ic_project" - android:layout_width="20dp" - android:layout_height="20dp" - android:layout_marginRight="15dp" - android:layout_centerVertical="true" - android:src="@mipmap/icon_project" /> - - <TextView - android:id="@+id/projectName" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - - android:layout_marginEnd="15dp" - android:layout_toStartOf="@+id/stateText" - android:layout_toEndOf="@+id/ic_project" - android:ellipsize="end" - android:maxLines="1" - android:text="@{data.taskType}" - android:textColor="@color/title_color" - android:textSize="@dimen/order_detail_text_size" /> - - - <TextView - android:id="@+id/stateText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:background="@drawable/ic_edt_gray_bg" - android:gravity="center" - android:paddingLeft="10dp" - android:paddingTop="5dp" - android:paddingRight="10dp" - android:paddingBottom="5dp" - android:text="@{data.state}" - android:textSize="@dimen/manage_item_text_state_size" /> - - - </RelativeLayout> + android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:orientation="horizontal"> - - - <TextView - android:id="@+id/jinduTag" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="宸ュ崟ID锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - android:id="@+id/jindu" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@{data.workOrderId}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:orientation="horizontal"> - - - <TextView - - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="娲惧崟浜哄鍚嶏細" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@{data.dispatcher}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:orientation="horizontal"> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="娲惧崟鏃堕棿锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@{data.dispatchTime}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:gravity="center_vertical" - android:orientation="horizontal"> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:text="浠诲姟绫诲瀷锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - android:id="@+id/startTime" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@{data.taskType}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - </LinearLayout> - - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:orientation="horizontal"> - - - <TextView - android:id="@+id/daiShenPiTag" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="瑕佹眰瀹屾垚鏃堕棿锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - android:id="@+id/daiShenPi" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@{data.deadLine}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:gravity="center_vertical" - android:orientation="horizontal"> - - - <TextView - - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="瀹屾垚鏍囧噯锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - android:id="@+id/xiangMuJianCheng" - android:layout_width="match_parent" - android:layout_height="wrap_content" - - android:text="@{data.completeCriteria}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dp" - android:gravity="center_vertical" - android:orientation="horizontal"> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="浠诲姟鍐呭锛�" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - <TextView - android:id="@+id/xiangMuType" - android:layout_width="match_parent" - android:layout_height="wrap_content" - - android:text="@{data.taskContent}" - android:textColor="@color/manage_item_text" - android:textSize="@dimen/order_detail_text_size" /> - - - </LinearLayout> - - - <LinearLayout - android:id="@+id/orderDealLL" - android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginTop="15dp" + android:layout_marginRight="10dp" + android:layout_marginBottom="20dp" + android:background="@drawable/bg_detail_wite" android:orientation="vertical" - android:visibility="gone"> + android:paddingLeft="10dp" + android:paddingTop="15dp" + android:paddingRight="10dp" + android:paddingBottom="20dp"> - <TextView + + <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="10dp" - android:gravity="center" - android:text="澶勭悊缁撴灉" - android:textColor="@color/base_blue" - android:textSize="@dimen/order_detail_text_size" /> + android:minHeight="30dp" + android:orientation="horizontal"> + <ImageView + android:id="@+id/ic_project" + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_centerVertical="true" + android:layout_marginLeft="10dp" + android:layout_marginRight="15dp" + android:src="@mipmap/icon_project" /> + + <TextView + android:id="@+id/projectName" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + + android:layout_marginEnd="15dp" + android:layout_toStartOf="@+id/stateText" + android:layout_toEndOf="@+id/ic_project" + android:ellipsize="end" + android:maxLines="1" + android:text="@{data.taskType}" + android:textColor="@color/title_color" + android:textSize="@dimen/order_detail_text_size" /> + + + <TextView + android:id="@+id/stateText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:background="@drawable/ic_edt_gray_bg" + android:gravity="center" + android:paddingLeft="10dp" + android:paddingTop="5dp" + android:paddingRight="10dp" + android:paddingBottom="5dp" + android:text="@{data.processingState}" + android:textSize="@dimen/manage_item_text_state_size" /> + + + </RelativeLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:orientation="horizontal"> + + + <TextView + android:id="@+id/jinduTag" + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="宸ュ崟ID锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:id="@+id/jindu" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{data.workOrderId}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:orientation="horizontal"> + + + <TextView + + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="娲惧崟浜哄鍚嶏細" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{data.dispatcher}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:orientation="horizontal"> + + + <TextView + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="娲惧崟鏃堕棿锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{data.dispatchTime}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + + <TextView + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="浠诲姟绫诲瀷锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:id="@+id/startTime" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{data.taskType}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + </LinearLayout> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:orientation="horizontal"> + + + <TextView + android:id="@+id/daiShenPiTag" + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="瑕佹眰瀹屾垚鏃堕棿锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:id="@+id/daiShenPi" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{data.deadLine}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> <LinearLayout android:layout_width="match_parent" @@ -300,16 +252,133 @@ <TextView + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="瀹屾垚鏍囧噯锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:id="@+id/xiangMuJianCheng" + android:layout_width="match_parent" + android:layout_height="wrap_content" + + android:text="@{data.completeCriteria}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + + <TextView + android:layout_width="120dp" + android:layout_height="wrap_content" + android:gravity="right" + android:text="浠诲姟鍐呭锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:id="@+id/xiangMuType" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{data.taskContent}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + </LinearLayout> + + <LinearLayout + android:id="@+id/orderDealLL" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" + android:layout_marginBottom="20dp" + android:background="@drawable/bg_detail_wite" + android:orientation="vertical" + android:paddingLeft="10dp" + android:paddingTop="15dp" + android:paddingRight="10dp" + android:paddingBottom="20dp"> + + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + + android:layout_marginBottom="5dp" + android:gravity="center" + android:text="澶勭悊缁撴灉" + android:textColor="@color/base_blue" + android:textSize="@dimen/order_detail_text_size" + android:textStyle="bold" /> + + <View + android:layout_width="match_parent" + android:layout_height="2dp" + android:background="@color/base_blue" /> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + + <TextView + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="鍙嶉锛�" - android:textColor="@color/manage_item_text" + android:text="鍙嶉璇︽儏锛�" + android:textColor="@color/item_name_text_color" android:textSize="@dimen/order_detail_text_size" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@{data.completeCriteria}" + android:text="@{dealData.content}" + android:textColor="@color/manage_item_text" + android:textSize="@dimen/order_detail_text_size" /> + + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + + <TextView + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="鍙嶉鏃堕棿锛�" + android:textColor="@color/item_name_text_color" + android:textSize="@dimen/order_detail_text_size" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{dealData.reportTime}" android:textColor="@color/manage_item_text" android:textSize="@dimen/order_detail_text_size" /> @@ -326,8 +395,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="鍙嶉鍥剧墖锛�" - android:textColor="@color/manage_item_text" + android:text="鍙嶉鍥剧墖鎴栬棰戯細" + android:textColor="@color/item_name_text_color" android:textSize="@dimen/order_detail_text_size" /> <androidx.recyclerview.widget.RecyclerView @@ -335,7 +404,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" - android:layout_marginTop="10dp" /> + android:layout_marginTop="10dp" + android:minHeight="100dp" /> </LinearLayout> @@ -350,12 +420,13 @@ android:layout_width="match_parent" android:layout_height="@dimen/order_detail_button_height" android:layout_alignParentBottom="true" - android:background="@color/title_color" + android:background="@drawable/bottom_butten_blue_ripple" android:gravity="center" - android:text="澶勭悊宸ュ崟" android:onClick="@{()->itemclidk.startDealActivity()}" + android:text="澶勭悊宸ュ崟" android:textColor="@color/white" - android:textSize="@dimen/order_detail_button_size" /> + android:textSize="@dimen/order_detail_button_size" + android:visibility="gone" /> </RelativeLayout> -- Gitblit v1.8.0