添加位置信息编辑功能

This commit is contained in:
ZhanGSKen
2025-09-30 01:54:11 +08:00
parent 72ba518c6d
commit dee9586748
15 changed files with 752 additions and 15 deletions

View File

@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 根布局改为RelativeLayout支持悬浮按钮绝对定位右下角 -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp">
<!-- 原有内容:经纬度显示区域(保持居中) -->
<!-- 1. 经纬度显示区域(保持居中,上方 -->
<LinearLayout
android:id="@+id/layout_location_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:orientation="vertical"
android:gravity="center_horizontal">
@@ -27,7 +28,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前经度:等待更新..."
android:textSize="18sp"/>
android:textSize="18sp"
android:layout_marginTop="15dp"/>
<!-- 纬度显示 -->
<TextView
@@ -35,11 +37,22 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前纬度:等待更新..."
android:textSize="18sp"/>
android:textSize="18sp"
android:layout_marginTop="10dp"/>
</LinearLayout>
<!-- 新增右下角圆形悬浮按钮中间显示大写P字母 -->
<!-- 2. 新增位置列表RecyclerView- 位于经纬度下方,悬浮按钮上方 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_position_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/layout_location_info"
android:layout_above="@id/fab_p_button"
android:layout_marginTop="20dp"
android:paddingBottom="10dp"/>
<!-- 3. 右下角圆形悬浮按钮(不变) -->
<Button
android:id="@+id/fab_p_button"
android:layout_width="60dp"