[清扫车]清扫车当前任务View封装处理

This commit is contained in:
bxb
2023-01-13 17:42:57 +08:00
parent 739fe8cfe7
commit c60f5cacb5
13 changed files with 256 additions and 226 deletions

View File

@@ -0,0 +1,54 @@
package com.mogo.och.sweeper.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.och.sweeper.R;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
/**
* 清扫车当前任务信息展示
*/
public class SweeperCurrentTaskInfoView extends ConstraintLayout {
private TextView mTvTaskName;
private TextView mTvTaskTime;
private TextView mTvTaskState;
private ImageView mIvMore;
private SubTaskView mCurrentSubTask;
private SubTaskView mNextSubTask;
private SubTaskView mLastSubTask;
public SweeperCurrentTaskInfoView(@NonNull Context context) {
super(context);
}
public SweeperCurrentTaskInfoView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initView(context);
}
public SweeperCurrentTaskInfoView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public SweeperCurrentTaskInfoView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
private void initView(@NonNull Context context) {
LayoutInflater.from(context).inflate(R.layout.sweeper_current_task_info, this);
mTvTaskName=findViewById(R.id.tvTaskName);
mTvTaskTime=findViewById(R.id.tvTaskTime);
mTvTaskState=findViewById(R.id.tvTaskState);
mIvMore=findViewById(R.id.ivMore);
mCurrentSubTask=findViewById(R.id.currentSubTask);
mNextSubTask=findViewById(R.id.nextSubTask);
mLastSubTask=findViewById(R.id.lastSubTask);
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:startColor="#348DD7" android:endColor="#4973B0" android:angle="0"/>
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#76839D"/>
<corners android:radius="@dimen/dp_10"/>
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:startColor="#E39945" android:endColor="#CA724F" android:angle="0"/>
<corners android:radius="@dimen/dp_10"/>
</shape>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M150.5,431.1q37.9,0 58.4,24.1t20.5,51.7l0,11.3q0,34.8 -17.9,58.9t-59.9,24.1l-7.2,0q-38.9,0 -62,-21.5t-23,-59.4l0,-14.3q0,-13.3 5.6,-26.6t15.9,-24.1 25.6,-17.4 33.8,-6.7l10.2,0zM519.2,431.1q37.9,0 58.4,24.1t20.5,51.7l0,11.3q0,34.8 -17.9,58.9t-59.9,24.1l-7.2,0q-38.9,0 -62,-21.5t-23,-59.4l0,-14.3q0,-13.3 5.6,-26.6t15.9,-24.1 25.6,-17.4 33.8,-6.7l10.2,0zM887.8,431.1q37.9,0 58.4,24.1t20.5,51.7l0,11.3q0,34.8 -17.9,58.9t-59.9,24.1l-7.2,0q-38.9,0 -62,-21.5t-23,-59.4l0,-14.3q0,-13.3 5.6,-26.6t15.9,-24.1 25.6,-17.4 33.8,-6.7l10.2,0z"
android:fillColor="#ffffff"/>
</vector>

View File

@@ -3,8 +3,8 @@
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="40dp"
android:bottomRightRadius="40dp"/>
<corners android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"/>
<gradient android:angle="180" android:endColor="#004DFF" android:startColor="#20AAFF" />
</shape>
</item>

View File

@@ -133,7 +133,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:src="@drawable/sweeper_icon_arrived_station"
android:src="@drawable/sweeper_icon_current_subtask"
app:layout_constraintBottom_toBottomOf="@+id/module_och_sweeper_current_station"
app:layout_constraintLeft_toLeftOf="@+id/module_och_sweeper_line_name"
app:layout_constraintTop_toTopOf="@+id/module_och_sweeper_current_station" />
@@ -164,7 +164,7 @@
android:layout_width="@dimen/sweeper_switch_line_btn_width_1"
android:layout_height="@dimen/sweeper_switch_line_btn_height_1"
android:layout_marginLeft="@dimen/dp_28"
android:background="@drawable/sweeper_switch_line_btn"
android:background="@drawable/sweeper_ready"
android:gravity="center"
android:text="@string/sweeper_switch_line_btn"
android:textColor="@android:color/white"

View File

@@ -26,7 +26,7 @@
android:layout_width="20dp"
android:layout_height="20dp"
android:scaleType="center"
android:src="@drawable/sweeper_icon_arrived_station"
android:src="@drawable/sweeper_icon_current_subtask"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_sweeper_station_name"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintVertical_bias="0.4"

View File

@@ -5,201 +5,73 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_72">
<FrameLayout
android:id="@+id/fl_speed"
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_320"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_40"
android:visibility="visible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.mogo.och.sweeper.view.SweeperTrafficDataView
android:id="@+id/sweeper_arc"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_autopilot_status"
android:layout_width="@dimen/module_mogo_och_autopilot_status_bg_width"
android:layout_height="@dimen/module_mogo_och_autopilot_status_bg_height"
app:layout_constraintTop_toBottomOf="@+id/fl_speed"
android:background="@drawable/sweeper_autopilot_status_bg"
app:layout_constraintLeft_toLeftOf="parent"
<com.mogo.och.sweeper.view.SweeperTrafficDataView
android:id="@+id/sweeper_arc"
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_320"
android:layout_marginLeft="@dimen/dp_13"
android:gravity="center"
tools:visibility="visible"
android:visibility="gone">
<ImageView
android:id="@+id/sweeper_autopilot_btn_iv"
android:layout_width="73dp"
android:layout_height="73dp"
android:layout_centerVertical="true"
android:src="@drawable/sweeper_ic_autopilot" />
<TextView
android:id="@+id/sweeper_autopolot_btn_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="28dp"
android:layout_toRightOf="@+id/sweeper_autopilot_btn_iv"
android:text="自动驾驶"
android:textColor="@color/sweeper_autopilot_text_color_normal"
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
android:textStyle="bold" />
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<com.mogo.och.sweeper.view.SweeperWorkModeView
android:id="@+id/sweeper_cl_work_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_41"
android:background="@drawable/bg_shape_work_mode"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sweeper_arc"/>
<com.mogo.och.sweeper.view.SweeperCurrentTaskInfoView
app:layout_constraintTop_toBottomOf="@+id/sweeper_cl_work_mode"
android:layout_width="@dimen/dp_560"
android:layout_height="@dimen/dp_170"
android:background="@drawable/bg_shape_work_mode"
app:layout_constraintTop_toBottomOf="@+id/fl_speed"
android:layout_height="0dp"
app:layout_constraintLeft_toLeftOf="parent"
android:id="@+id/sweeper_cl_work_mode"
android:layout_marginStart="@dimen/dp_41">
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:text="当前作业模式:"
android:textColor="@color/white"
android:textSize="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginStart="@dimen/dp_36"/>
<TextView
android:id="@+id/tvCleaningMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
app:layout_constraintStart_toStartOf="@+id/tvTitle"
android:text="纯扫模式"
android:textSize="@dimen/dp_34"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_16"
android:background="@drawable/bg_shape_clean_mode"
android:paddingStart="@dimen/dp_10"
android:paddingEnd="@dimen/dp_10"
android:paddingTop="@dimen/dp_2"
android:paddingBottom="@dimen/dp_2"
android:gravity="center"/>
<TextView
android:id="@+id/tvCleaningDirection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@+id/tvCleaningMode"
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
android:text="左侧"
android:textSize="@dimen/dp_34"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_16"
android:background="@drawable/bg_shape_clean_mode"
android:paddingStart="@dimen/dp_10"
android:paddingEnd="@dimen/dp_10"
android:paddingTop="@dimen/dp_2"
android:paddingBottom="@dimen/dp_2"
android:layout_marginStart="@dimen/dp_20"
android:gravity="center"/>
<TextView
android:id="@+id/tvCleaningIntensity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@+id/tvCleaningDirection"
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
android:text="标准"
android:textSize="@dimen/dp_34"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_16"
android:background="@drawable/bg_shape_clean_mode"
android:paddingStart="@dimen/dp_10"
android:paddingEnd="@dimen/dp_10"
android:paddingTop="@dimen/dp_2"
android:paddingBottom="@dimen/dp_2"
android:layout_marginStart="@dimen/dp_20"
android:gravity="center"/>
<ImageView
android:layout_width="@dimen/dp_54"
android:layout_height="@dimen/dp_40"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="@dimen/dp_30"
android:src="@drawable/sweeper_clean_mode_icon"/>
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintBottom_toTopOf="@+id/sweeper_switch_model_layout"
android:layout_marginStart="@dimen/dp_41"
android:layout_marginTop="@dimen/dp_36"
android:layout_marginBottom="@dimen/dp_30"
/>
<FrameLayout
android:id="@+id/module_mogo_och_station_panel_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
android:id="@+id/module_mogo_och_task_list_container"
android:layout_width="@dimen/dp_560"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/dp_13"
app:layout_constraintTop_toBottomOf="@id/sweeper_cl_work_mode"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/sweeper_arc"
app:layout_goneMarginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call"
tools:visibility="visible" />
app:layout_constraintBottom_toTopOf="@+id/sweeper_switch_model_layout"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_36"/>
<com.mogo.och.sweeper.ui.SweeperOperatePanelView
android:id="@+id/module_mogo_och_sweeper_operate_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:visibility="gone"
app:layout_constraintLeft_toRightOf="@id/sweeper_cl_work_mode"
app:layout_constraintTop_toTopOf="@id/sweeper_cl_work_mode"
android:visibility="gone"
tools:visibility="visible" />
<include
android:id="@+id/module_mogo_och_sweeper_test_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="@layout/sweeper_test_bar_view"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/module_mogo_och_station_panel_container"
app:layout_constraintLeft_toLeftOf="@id/module_mogo_och_station_panel_container"
tools:visibility="visible"/>
<!--切换地图远近事件 @dimen/module_switch_map -->
<LinearLayout
android:id="@+id/sweeper_switch_model_layout"
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:background="@drawable/sweeper_switch_map_bg"
android:elevation="@dimen/sweeper_dp_10"
android:padding="@dimen/sweeper_dp_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/sweeper_switch_model_icon"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center" />
</LinearLayout>
<CheckedTextView
android:id="@+id/module_mogo_och_operation_status"
<LinearLayout
android:id="@+id/sweeper_switch_model_layout"
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:background="@drawable/sweeper_operation_status_bg"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:text="出车"
android:textAlignment="center"
android:textColor="@color/sweeper_autopilot_text_color_selector"
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
android:textStyle="bold"
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:background="@drawable/sweeper_switch_map_bg"
android:elevation="@dimen/sweeper_dp_10"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/sweeper_dp_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:visibility="gone"/>
app:layout_constraintLeft_toLeftOf="parent">
<ImageView
android:id="@+id/sweeper_switch_model_icon"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center" />
</LinearLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_setting_layout"
@@ -211,6 +83,7 @@
android:elevation="@dimen/dp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/sweeper_switch_model_layout">
<ImageView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
@@ -229,12 +102,13 @@
android:elevation="@dimen/dp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout">
<ImageView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:src="@drawable/bad_case_selector"/>
android:src="@drawable/bad_case_selector" />
</RelativeLayout>
<RelativeLayout
@@ -243,8 +117,8 @@
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:elevation="@dimen/dp_10"
android:background="@drawable/sweeper_operation_status_bg_selector"
android:elevation="@dimen/dp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl">
@@ -255,26 +129,6 @@
android:layout_gravity="center"
android:src="@drawable/ai_collect_selector" />
</RelativeLayout>
<com.mogo.och.sweeper.view.SlidePanelView
android:id="@+id/module_mogo_och_slide_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:visibility="invisible"
app:BLOCK_START_X="@dimen/module_mogo_och_slide_panel_block_start_x"
app:BLOCK_START_Y="@dimen/module_mogo_och_slide_panel_block_start_y"
app:NORMAL_TEXT_MARGIN_LEFT="@dimen/module_mogo_och_slide_panel_normal_text_margin_left"
app:NORMAL_TEXT_MARGIN_RIGHT="@dimen/module_mogo_och_slide_panel_normal_text_margin_right"
app:SHORT_TEXT_MARGIN_LEFT="@dimen/module_mogo_och_slide_panel_short_text_margin_left"
app:SHORT_TEXT_MARGIN_RIGHT="@dimen/module_mogo_och_slide_panel_short_text_margin_right"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:textSize="@dimen/module_mogo_och_slide_panel_textSize"
tools:visibility="visible"
/>
<Button
android:id="@+id/btnAutopilotDisable"
android:layout_width="wrap_content"
@@ -304,33 +158,13 @@
android:textSize="30sp"
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
app:layout_constraintTop_toBottomOf="@id/btnAutopilotEnable" />
<Button
android:id="@+id/btnAutopilotArrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#f00"
android:text="Arrived"
android:textSize="30sp"
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
app:layout_constraintTop_toBottomOf="@id/btnAutopilotRunning" />
<Button
android:id="@+id/btnAutopilotRoute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#023D35"
android:text="上传全路径"
android:textSize="30sp"
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
app:layout_constraintTop_toBottomOf="@id/btnAutopilotArrive" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupTestPanel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable
,btnAutopilotRunning,btnAutopilotRoute"
app:constraint_referenced_ids="btnAutopilotDisable,btnAutopilotEnable
,btnAutopilotRunning"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/bg_shape_work_mode">
<TextView
android:id="@+id/tvTaskName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:textSize="@dimen/dp_38"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_21"
android:text="任务AAAAAAA"
android:layout_marginStart="@dimen/dp_28"
/>
<TextView
android:id="@+id/tvTaskTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tvTaskName"
app:layout_constraintStart_toStartOf="parent"
android:textSize="@dimen/dp_28"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_21"
android:text="9:00"
android:layout_marginStart="@dimen/dp_28"
android:background="@drawable/bg_shape_clean_mode"
android:paddingStart="@dimen/dp_12"
android:paddingEnd="@dimen/dp_12"
android:paddingTop="@dimen/dp_1"
android:paddingBottom="@dimen/dp_1"
/>
<TextView
android:id="@+id/tvTaskState"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tvTaskName"
app:layout_constraintStart_toEndOf="@+id/tvTaskTime"
android:textSize="@dimen/dp_28"
android:textColor="@color/white"
android:layout_marginTop="@dimen/dp_21"
android:text="暂未准备"
android:layout_marginStart="@dimen/dp_18"
android:background="@drawable/bg_shape_task_state_not_ready"
android:paddingStart="@dimen/dp_15"
android:paddingEnd="@dimen/dp_15"
android:paddingTop="@dimen/dp_1"
android:paddingBottom="@dimen/dp_1"
/>
<ImageView
android:id="@+id/ivMore"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
app:layout_constraintEnd_toEndOf="parent"
android:src="@drawable/icon_more"
app:layout_constraintTop_toTopOf="@+id/tvTaskName"
app:layout_constraintBottom_toBottomOf="@+id/tvTaskTime"
android:layout_marginEnd="@dimen/dp_38"
/>
<View
android:id="@+id/viewTaskInfoLine"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@drawable/bg_shape_task_info_line"
app:layout_constraintTop_toBottomOf="@+id/tvTaskTime"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_26"/>
<com.mogo.och.sweeper.view.SubTaskView
android:id="@+id/currentSubTask"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/viewTaskInfoLine"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_30"
/>
<com.mogo.och.sweeper.view.SubTaskView
android:id="@+id/nextSubTask"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/currentSubTask"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_16"
/>
<com.mogo.och.sweeper.view.SubTaskView
android:id="@+id/lastSubTask"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/nextSubTask"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_16"
/>
<TextView
android:id="@+id/switch_line_btn"
android:layout_width="match_parent"
android:layout_height="@dimen/sweeper_switch_line_btn_height_1"
android:background="@drawable/sweeper_ready"
android:gravity="center"
android:text="@string/sweeper_switch_line_btn"
android:textColor="@android:color/white"
android:textSize="@dimen/module_mogo_och_sweeper_station_notice_text_size"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="@dimen/dp_20"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -14,7 +14,7 @@
<dimen name="module_mogo_och_sweeper_current_station_name_text_size">32dp</dimen>
<dimen name="module_mogo_och_sweeper_current_station_notice_text_size">20dp</dimen>
<dimen name="module_mogo_och_sweeper_station_name_text_size">26dp</dimen>
<dimen name="module_mogo_och_sweeper_station_notice_text_size">20dp</dimen>
<dimen name="module_mogo_och_sweeper_station_notice_text_size">42dp</dimen>
<dimen name="module_mogo_och_sweeper_station_name_margin_left">15dp</dimen>

View File

@@ -10,7 +10,7 @@
<string name="sweeper_switch_line_start">起点: </string>
<string name="sweeper_switch_line_end">终点:</string>
<string name="sweeper_switch_line_btn_txt">确认</string>
<string name="sweeper_switch_line_btn">切换路线</string>
<string name="sweeper_switch_line_btn">准备就绪</string>
<string name="sweeper_switch_line_btn_warning1">自动驾驶中,不可切换路线</string>
<string name="sweeper_switch_line_btn_warning2">当前行程未完成,不可切换路线</string>
<string name="sweeper_no_line_tip">当前车辆无路线\n请联系运营人员绑定</string>

View File

@@ -69,6 +69,7 @@ import function_state_management.FunctionStates;
import mogo.telematics.pad.MessagePad;
import mogo_msg.MogoReportMsg;
import perception.TrafficLightOuterClass;
import planning.RoboSweeperTaskIndexOuterClass;
import prediction.Prediction;
import record_cache.RecordPanelOuterClass;
import system_master.SystemStatusInfo;
@@ -542,6 +543,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
}
@Override
public void onSweeperTaskIndexData(MessagePad.Header header, RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex roboSweeperTaskIndex) {
}
private void initAdas() {
CupidLogUtils.e(TAG, "--->初始化");