添加位置信息编辑功能
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user