添加位置信息编辑功能
This commit is contained in:
60
positions/src/main/res/layout/item_position.xml
Normal file
60
positions/src/main/res/layout/item_position.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 列表项布局:左侧显示经纬度/备注,右侧添加删除按钮 -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/item_position_bg"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center_vertical"> <!-- 内容与按钮垂直居中对齐 -->
|
||||
|
||||
<!-- 左侧:内容区(经纬度+备注,垂直排列,占满剩余宽度) -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:clickable="false"> <!-- 内容区禁止点击响应 -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_item_longitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_item_latitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginTop="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_item_memo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#000000"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="8dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧:删除按钮(红色图标/文字,仅按钮可点击) -->
|
||||
<Button
|
||||
android:id="@+id/btn_item_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/btn_delete_bg"
|
||||
android:text="删除"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user