位置任务参数数据管理模块完成
This commit is contained in:
@@ -1,152 +1,170 @@
|
||||
<?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="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/item_position_bg"
|
||||
android:layout_marginBottom="8dp">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/item_bg_edit">
|
||||
|
||||
<!-- 1. 经纬度显示(不变) -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="12dp">
|
||||
<TextView
|
||||
android:id="@+id/tv_edit_longitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#999999"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_edit_longitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_edit_latitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#999999"
|
||||
android:layout_marginTop="4dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_edit_latitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginTop="5dp"/>
|
||||
<EditText
|
||||
android:id="@+id/et_edit_memo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入位置备注"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/edittext_bg"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 2. 备注输入框(不变,调整下方间距为8dp,与新增单选框区过渡更自然) -->
|
||||
<EditText
|
||||
android:id="@+id/et_edit_memo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入位置备注(如:公司/家/学校)"
|
||||
android:textSize="16sp"
|
||||
android:inputType="textMultiLine"
|
||||
android:minLines="2"
|
||||
android:maxLines="4"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/edittext_bg"
|
||||
android:layout_marginBottom="8dp"/> <!-- 原12dp→8dp,优化与单选框的间距 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#333333"
|
||||
android:id="@+id/tv_edit_real_distance"/>
|
||||
|
||||
<!-- 新增3:实时距离开关(单选框组)- 控制isEnableRealPositionDistance属性 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="12dp"> <!-- 与下方按钮区保持12dp间距,符合原有布局规范 -->
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_real_distance_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="8dp">
|
||||
|
||||
<!-- 单选框标题(说明用途,文字颜色与经纬度一致,保持风格统一) -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实时距离计算:"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginRight="12dp"/> <!-- 与单选框保持12dp间距,避免拥挤 -->
|
||||
<RadioButton
|
||||
android:id="@+id/rb_disable"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="禁用"
|
||||
android:textSize="14sp"
|
||||
android:checked="true"/>
|
||||
|
||||
<!-- 单选框组(RadioGroup):确保“启用/禁用”二选一 -->
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_real_distance_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:checkedButton="@+id/rb_disable"> <!-- 默认选中“禁用”,匹配isEnable默认值false -->
|
||||
<RadioButton
|
||||
android:id="@+id/rb_enable"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启用"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="15dp"/>
|
||||
|
||||
<!-- 单选框1:禁用实时距离(对应isEnableRealPositionDistance=false) -->
|
||||
<RadioButton
|
||||
android:id="@+id/rb_disable"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="禁用"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_marginRight="16dp"/> <!-- 与“启用”单选框保持16dp间距 -->
|
||||
</RadioGroup>
|
||||
|
||||
<!-- 单选框2:启用实时距离(对应isEnableRealPositionDistance=true) -->
|
||||
<RadioButton
|
||||
android:id="@+id/rb_enable"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启用"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"/>
|
||||
</LinearLayout>
|
||||
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<!-- 4. 按钮区(不变:顺序→删除(左)→取消→确定(右)) -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<Button
|
||||
android:id="@+id/btn_edit_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_delete_bg"
|
||||
android:text="删除位置"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
|
||||
<!-- ① 删除按钮(最左侧,红色) -->
|
||||
<Button
|
||||
android:id="@+id/btn_edit_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_delete_bg"
|
||||
android:text="删除"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 间隔(按钮间间距) -->
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
<Button
|
||||
android:id="@+id/btn_edit_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_cancel_bg"
|
||||
android:text="取消"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
|
||||
<!-- ② 取消按钮(中间,灰色,不保存返回简单视图) -->
|
||||
<Button
|
||||
android:id="@+id/btn_edit_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_cancel_bg"
|
||||
android:text="取消"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 间隔 -->
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
<Button
|
||||
android:id="@+id/btn_edit_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_confirm_bg"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
|
||||
<!-- ③ 确定按钮(最右侧,蓝色,保存并返回简单视图) -->
|
||||
<Button
|
||||
android:id="@+id/btn_edit_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/btn_confirm_bg"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="关联任务(可编辑):"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#333333"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add_task"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/btn_confirm_bg"
|
||||
android:text="添加新任务"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<cc.winboll.studio.positions.views.PositionTaskListView
|
||||
android:id="@+id/ptlv_edit_tasks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user