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/fragment_map.xml | 106 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 88 insertions(+), 18 deletions(-) diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml index e0de4e9..b64df88 100644 --- a/app/src/main/res/layout/fragment_map.xml +++ b/app/src/main/res/layout/fragment_map.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" - xmlns:app="http://schemas.android.com/apk/res-auto"> + android:layout_height="match_parent"> <!-- <com.github.lzyzsd.jsbridge.BridgeWebView--> <!-- android:id="@+id/webView"--> @@ -79,15 +79,31 @@ </RelativeLayout> + + <com.example.expand_button.CustomSearchBar + android:id="@+id/searchButton" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_alignParentRight="true" + android:layout_below="@+id/inspectRL" + android:layout_marginTop="20dp" + android:layout_marginRight="15dp" + android:background="@drawable/ic_blue_background_down" + android:textColor="@color/white" + android:textSize="18sp" /> + + <TextView android:id="@+id/inspectButton" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="40dp" + android:minWidth="40dp" + android:layout_below="@+id/searchButton" android:layout_alignParentRight="true" - android:layout_marginTop="60dp" + android:layout_marginTop="10dp" android:layout_marginRight="15dp" android:background="@drawable/ic_blue_background" - android:padding="10dp" + android:gravity="center" android:text="宸�" android:textColor="@color/white" android:textSize="18sp" /> @@ -96,13 +112,15 @@ <TextView android:id="@+id/putButton" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="40dp" android:layout_alignParentRight="true" - android:layout_marginTop="120dp" + android:layout_marginTop="10dp" + android:layout_below="@+id/inspectButton" android:layout_marginRight="15dp" android:background="@drawable/ic_green_bg" - android:padding="10dp" android:text="鎶�" + android:minWidth="40dp" + android:gravity="center" android:textColor="@color/white" android:textSize="18sp" /> @@ -110,17 +128,19 @@ android:id="@+id/expandButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="10dp" - android:background="@drawable/ic_green_bg" android:layout_alignParentRight="true" - android:layout_marginTop="180dp" - android:textSize="18sp" + android:layout_marginTop="10dp" android:layout_marginRight="15dp" + android:layout_marginLeft="15dp" + android:layout_below="@+id/putButton" + android:background="@drawable/ic_green_bg" android:textColor="@color/white" + android:textSize="18sp" + app:animDuration="300" + app:collapsedText="渚�" app:letterSpacing="10dp" - app:expandedText="鐐瑰嚮灞曞紑" - app:collapsedText="鐐�" - app:animDuration="300" /> + app:expandedTextSize="12sp"/> + <RelativeLayout android:id="@+id/pointRL" android:layout_width="match_parent" @@ -212,7 +232,54 @@ android:textColor="@color/black" android:textSize="@dimen/common_text_size_little" /> </LinearLayout> + <LinearLayout + android:id="@+id/deviceStateLL" + android:layout_width="match_parent" + android:layout_height="25dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="璁惧锛�" + android:textColor="@color/black" + android:textSize="@dimen/common_text_size_little" /> + + <TextView + android:id="@+id/deviceState" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="1" + android:text="鏈煡" + android:textColor="@color/black" + android:textSize="@dimen/common_text_size_little" /> + </LinearLayout> + <LinearLayout + android:id="@+id/rtuAddressLL" + android:layout_width="match_parent" + android:layout_height="25dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="RTU鍦板潃锛�" + android:textColor="@color/black" + android:textSize="@dimen/common_text_size_little" /> + + <TextView + android:id="@+id/rtuAddress" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="1" + android:text="鏈煡" + android:textColor="@color/black" + android:textSize="@dimen/common_text_size_little" /> + </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="25dp" @@ -255,8 +322,9 @@ android:id="@+id/lng" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" + android:layout_weight="4" android:ellipsize="end" + android:text="" android:maxLines="1" android:textColor="@color/manage_item_text" android:textSize="@dimen/common_text_size_little" /> @@ -272,15 +340,17 @@ android:id="@+id/lat" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" + android:layout_weight="4" android:ellipsize="end" android:maxLines="1" + android:text="" android:textColor="@color/manage_item_text" android:textSize="@dimen/common_text_size_little" /> <ImageView android:id="@+id/editePoint" - android:layout_width="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" android:layout_height="wrap_content" android:padding="2dp" android:src="@drawable/ic_edit_btn" /> -- Gitblit v1.8.0