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 | 214 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 194 insertions(+), 20 deletions(-)
diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml
index c2f0355..b64df88 100644
--- a/app/src/main/res/layout/fragment_map.xml
+++ b/app/src/main/res/layout/fragment_map.xml
@@ -1,5 +1,6 @@
<?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">
@@ -9,9 +10,9 @@
<!-- android:layout_height="match_parent" />-->
<RelativeLayout
+ android:id="@+id/webViewRL"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_above="@+id/bottomLL">
+ android:layout_height="match_parent">
<WebView
@@ -20,12 +21,14 @@
android:layout_height="match_parent" />
<ImageView
+ android:id="@+id/pointCenterImg"
android:layout_width="26dp"
android:layout_height="52dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:paddingBottom="26dp"
- android:src="@drawable/ic_center_pin" />
+ android:src="@drawable/ic_center_pin"
+ android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
@@ -76,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="80dp"
+ 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" />
@@ -93,23 +112,72 @@
<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="140dp"
+ 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" />
+ <com.example.expand_button.ExpandButton
+ android:id="@+id/expandButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ 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:expandedTextSize="12sp"/>
<RelativeLayout
+ android:id="@+id/pointRL"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_above="@+id/bottomLL"
- android:background="@color/white">
+ android:background="@color/white"
+ android:visibility="gone">
+ <TextView
+ android:id="@+id/pointCancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_marginLeft="5dp"
+ android:padding="5dp"
+ android:text="鍙栨秷"
+ android:textSize="@dimen/common_text_size_little" />
+
+ <TextView
+ android:id="@+id/pointText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_centerVertical="true"
+ android:textSize="@dimen/common_text_size_little" />
+
+ <TextView
+ android:id="@+id/pointEdt"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:layout_marginRight="5dp"
+ android:padding="5dp"
+ android:text="淇敼"
+ android:textColor="@color/base_blue"
+ android:textSize="@dimen/common_text_size_little" />
</RelativeLayout>
<LinearLayout
@@ -118,8 +186,13 @@
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:background="@color/white"
- android:orientation="horizontal"
+ android:orientation="vertical"
android:visibility="gone">
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="2px"
+ android:background="@color/line_bg" />
<ScrollView
android:layout_width="match_parent"
@@ -136,7 +209,7 @@
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="25dp"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -146,6 +219,7 @@
android:layout_height="25dp"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
+ android:padding="3dp"
android:src="@drawable/ic_intake" />
<TextView
@@ -158,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"
@@ -185,7 +306,7 @@
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="25dp"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -201,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" />
@@ -218,25 +340,78 @@
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="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:padding="2dp"
+ android:src="@drawable/ic_edit_btn" />
+ </LinearLayout>
+
+
+ <LinearLayout
+ android:id="@+id/headerLL"
+ android:layout_width="match_parent"
+ android:layout_height="25dp"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="5dp"
- android:src="@drawable/ic_edit_btn" />
+ android:text="璐熻矗浜猴細"
+ android:textColor="@color/black"
+ android:textSize="@dimen/common_text_size_little" />
+
+ <TextView
+ android:id="@+id/header"
+ 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/phoneLL"
+ android:layout_width="match_parent"
+ android:layout_height="25dp"
+ android:gravity="center"
+ 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/phone"
+ 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="wrap_content"
+ android:layout_height="25dp"
android:layout_marginBottom="10dp"
- android:gravity="start"
+ android:gravity="center"
android:orientation="horizontal">
<TextView
@@ -256,7 +431,6 @@
android:textColor="@color/black"
android:textSize="@dimen/common_text_size_little" />
</LinearLayout>
-
</LinearLayout>
</ScrollView>
--
Gitblit v1.8.0