[sweeper-cloud]子任务列表布局搭建及其修改
This commit is contained in:
@@ -6,7 +6,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.sweepercloud.R
|
||||
import com.mogo.och.sweepercloud.bean.SubInfo
|
||||
import kotlinx.android.synthetic.main.sweeper_subtask_view.view.*
|
||||
@@ -32,25 +31,11 @@ class SubTaskView : ConstraintLayout {
|
||||
*/
|
||||
fun setData(taskInfo: SubInfo, isSelect: Boolean = false, isLastTask: Boolean = false) {
|
||||
tvSubTaskName.text = taskInfo.taskName
|
||||
var mileage: String = if (taskInfo.mileage < 1000) {
|
||||
"${taskInfo.mileage}米"
|
||||
} else {
|
||||
"${taskInfo.mileage / 1000F}千米"
|
||||
}
|
||||
val time=taskInfo.timeSpent.toLong()
|
||||
var timeSpent=if(DateTimeUtil.secondsToHourStr(time)!=""){
|
||||
"${DateTimeUtil.secondsToHourStr(time)}小时${DateTimeUtil.secondsToMinuteStr(time)}分钟"
|
||||
}else{
|
||||
"${DateTimeUtil.secondsToMinuteStr(time)}分钟"
|
||||
}
|
||||
tvSubTaskDesc.text = "全程约${mileage},预计耗时$timeSpent"
|
||||
tvSubTaskName.setTextColor(if (isSelect) Color.parseColor("#3BD2FF") else Color.parseColor("#FFFFFF"))
|
||||
if (isSelect) {
|
||||
ivSubTaskSelect.visibility = View.VISIBLE
|
||||
ivSubTask.visibility = View.GONE
|
||||
ivSubTask.setImageResource(R.drawable.sweeper_icon_select_subtask)
|
||||
} else {
|
||||
ivSubTaskSelect.visibility = View.GONE
|
||||
ivSubTask.visibility = View.VISIBLE
|
||||
ivSubTask.setImageResource(R.drawable.sweeper_icon_not_select_subtask)
|
||||
}
|
||||
ivRightDownArrow.visibility = if (isLastTask) View.GONE else View.VISIBLE
|
||||
}
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
package com.mogo.och.sweepercloud.view
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.sweepercloud.R
|
||||
import com.mogo.och.sweepercloud.bean.SubInfo
|
||||
import com.mogo.och.sweepercloud.bean.SweeperSubTaskBean
|
||||
import com.mogo.och.sweepercloud.constant.SubTaskTypeEnum
|
||||
import com.mogo.och.sweepercloud.presenter.SweeperPresenter
|
||||
import com.mogo.och.sweepercloud.ui.popwindow.MenuPopWindow
|
||||
import kotlinx.android.synthetic.main.sweeper_current_task_info.view.*
|
||||
|
||||
/**
|
||||
@@ -25,14 +19,10 @@ class SweeperCurrentTaskInfoView : ConstraintLayout {
|
||||
private val TAG: String = "SweeperCurrentTaskInfoView"
|
||||
|
||||
//当前任务操作菜单
|
||||
private var mTaskMenuPopWindow: MenuPopWindow? = null
|
||||
private var presenter: SweeperPresenter? = null
|
||||
private var mCurrentPosition = 0
|
||||
private var listTask: List<SubInfo>? = null
|
||||
private var mSubTaskType: SubTaskTypeEnum = SubTaskTypeEnum.AUTOPILOT_SUBTYPE
|
||||
private var mSubTaskStatus: Int = 1
|
||||
//当前自动驾驶状态
|
||||
private val mCurrentAutopilotStatus = 0
|
||||
|
||||
constructor(context: Context) : super(context) {}
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
||||
@@ -44,37 +34,17 @@ class SweeperCurrentTaskInfoView : ConstraintLayout {
|
||||
|
||||
private fun initView(context: Context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.sweeper_current_task_info, this)
|
||||
setEnableClickBtn(false)
|
||||
tvStartAuto.setOnClickListener {
|
||||
if (ClickUtils.isFastClick()){//防止重复点击
|
||||
if (mSubTaskStatus==1){
|
||||
ToastUtils.showLong("任务未开始无轨迹,无法启动自驾")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (mSubTaskType==SubTaskTypeEnum.MANUAL_DRIVING_SUBTYPE){
|
||||
ToastUtils.showLong("人工子任务无轨迹,无法启动自驾")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (mCurrentAutopilotStatus!=IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
|
||||
presenter?.startAutopilot()
|
||||
}
|
||||
}
|
||||
}
|
||||
setSubTaskState(false)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前任务数据
|
||||
*/
|
||||
fun setData(
|
||||
workModePanelView: SweeperWorkModeView,
|
||||
subTaskBean: SweeperSubTaskBean?,
|
||||
currentPosition: Int,
|
||||
menuItemClickListener: MenuPopWindow.OnMenuItemOnClickListener,
|
||||
presenter: SweeperPresenter?
|
||||
) {
|
||||
this.presenter = presenter
|
||||
this.mCurrentPosition = currentPosition
|
||||
mTaskMenuPopWindow = MenuPopWindow(context, menuItemClickListener)
|
||||
subTaskBean?.apply {
|
||||
this@SweeperCurrentTaskInfoView.listTask = subList
|
||||
tvTaskName.text = taskName
|
||||
@@ -82,110 +52,24 @@ class SweeperCurrentTaskInfoView : ConstraintLayout {
|
||||
tvTaskTime.text = DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.HH_mm)
|
||||
}
|
||||
listTask?.let {
|
||||
mSubTaskStatus=it[currentPosition].taskStatus
|
||||
setEnableClickBtn(mSubTaskStatus==2)
|
||||
mSubTaskStatus = it[currentPosition].taskStatus
|
||||
setSubTaskState(mSubTaskStatus == 2)
|
||||
}
|
||||
setCurrentData(currentPosition)
|
||||
//任务操作菜单打开关闭处理
|
||||
ivMore.setOnClickListener {
|
||||
if (mTaskMenuPopWindow?.isShowing != true) {
|
||||
mTaskMenuPopWindow?.showAsDropDown(
|
||||
workModePanelView,
|
||||
resources.getDimension(R.dimen.dp_580).toInt(),
|
||||
resources.getDimension(R.dimen.dp_36).toInt()
|
||||
)
|
||||
} else {
|
||||
mTaskMenuPopWindow?.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置准备就绪按钮时都可以点击
|
||||
* 设置子任务的状态
|
||||
*/
|
||||
fun setEnableClickBtn(isWorking: Boolean) {
|
||||
readyTaskBtn.isClickable=!isWorking
|
||||
presenter?.setWorking(isWorking)
|
||||
fun setSubTaskState(isWorking: Boolean) {
|
||||
if (isWorking) {
|
||||
tvTaskState.text = "正在作业"
|
||||
readyTaskBtn.text="任务中"
|
||||
readyTaskBtn.setTextColor(Color.parseColor("#FFFFFFFF"))
|
||||
tvTaskState.setBackgroundResource(R.drawable.bg_shape_task_state_working)
|
||||
readyTaskBtn.setBackgroundResource(R.drawable.sweeper_task_working)
|
||||
} else {
|
||||
tvTaskState.text = "暂未准备"
|
||||
readyTaskBtn.text="开始任务"
|
||||
readyTaskBtn.setTextColor(Color.parseColor("#66FFFFFF"))
|
||||
tvTaskState.setBackgroundResource(R.drawable.bg_shape_task_state_not_ready)
|
||||
readyTaskBtn.setBackgroundResource(R.drawable.sweeper_task_not_working)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置准备就绪按钮时都可以点击
|
||||
*/
|
||||
fun setStartAutoBtn(autopilotState: Int) {
|
||||
when (autopilotState) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {
|
||||
tvStartAuto.text="自动驾驶"
|
||||
tvStartAuto.setTextColor(Color.parseColor("#66FFFFFF"))
|
||||
tvStartAuto.setBackgroundResource(R.drawable.sweeper_start_auto_not_running)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {
|
||||
tvStartAuto.text="自动驾驶"
|
||||
tvStartAuto.setTextColor(Color.parseColor("#66FFFFFF"))
|
||||
tvStartAuto.setBackgroundResource(R.drawable.sweeper_start_auto_not_running)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
tvStartAuto.text="自动驾驶"
|
||||
tvStartAuto.setTextColor(Color.parseColor("#FFFFFFFF"))
|
||||
tvStartAuto.setBackgroundResource(R.drawable.sweeper_start_auto_running)
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
|
||||
tvStartAuto.text="平行驾驶"
|
||||
tvStartAuto.setTextColor(Color.parseColor("#FFFFFFFF"))
|
||||
tvStartAuto.setBackgroundResource(R.drawable.sweeper_start_auto_running)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始子任务
|
||||
*/
|
||||
private fun startSubTask() {
|
||||
listTask?.let {
|
||||
presenter?.startTask(
|
||||
isFirstSubTask(),
|
||||
isLastSubTask(),
|
||||
it[mCurrentPosition].taskId,
|
||||
if (it[mCurrentPosition].taskType == SubTaskTypeEnum.AUTOPILOT_SUBTYPE.code) SubTaskTypeEnum.AUTOPILOT_SUBTYPE else SubTaskTypeEnum.MANUAL_DRIVING_SUBTYPE,
|
||||
mSubTaskStatus
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否第一个子任务
|
||||
*/
|
||||
private fun isFirstSubTask(): Boolean {
|
||||
return mCurrentPosition == 0
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否第一个子任务
|
||||
*/
|
||||
private fun isLastSubTask(): Boolean {
|
||||
return mCurrentPosition == (listTask?.size?.minus(1))
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置任务状态
|
||||
*/
|
||||
fun setTaskStatus(status: Int) {
|
||||
this.mSubTaskStatus = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充数据
|
||||
*/
|
||||
@@ -205,13 +89,13 @@ class SweeperCurrentTaskInfoView : ConstraintLayout {
|
||||
preSubTask.setData(it[mCurrentPosition - 1])
|
||||
currentSubTask.setData(it[mCurrentPosition], isSelect = true, isLastTask = true)
|
||||
}
|
||||
preSubTask.visibility=View.VISIBLE
|
||||
currentSubTask.visibility=View.VISIBLE
|
||||
lastSubTask.visibility=View.GONE
|
||||
preSubTask.visibility = View.VISIBLE
|
||||
currentSubTask.visibility = View.VISIBLE
|
||||
lastSubTask.visibility = View.GONE
|
||||
} else {
|
||||
preSubTask.visibility=View.VISIBLE
|
||||
currentSubTask.visibility=View.VISIBLE
|
||||
lastSubTask.visibility=View.VISIBLE
|
||||
preSubTask.visibility = View.VISIBLE
|
||||
currentSubTask.visibility = View.VISIBLE
|
||||
lastSubTask.visibility = View.VISIBLE
|
||||
//当前正在执行的任务是第一个子任务
|
||||
if (mCurrentPosition == 0) {
|
||||
preSubTask.setData(it[mCurrentPosition], isSelect = true)
|
||||
|
||||
BIN
OCH/sweeper/sweeper-cloud/src/main/res/drawable-xhdpi/icon_manual_driving.png
Executable file
BIN
OCH/sweeper/sweeper-cloud/src/main/res/drawable-xhdpi/icon_manual_driving.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@@ -1,159 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_616"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:bgColor="#00000000"
|
||||
app:blurRadius="@dimen/dp_28"
|
||||
app:shadowColor="#80121526"
|
||||
app:shadowRadius="@dimen/dp_30"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp">
|
||||
android:background="@drawable/bg_shape_task_panel">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<TextView
|
||||
android:id="@+id/tvTaskName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_38"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="惠新西街南口地铁站公交站" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/bg_shape_clean_mode"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_2"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskName"
|
||||
android:text="9:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/bg_shape_task_state_not_ready"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingTop="@dimen/dp_1"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_1"
|
||||
android:gravity="center"
|
||||
android:text="暂未准备"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvTaskTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskName" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewTaskInfoLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_shape_task_panel">
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:background="@drawable/sweeper_task_dividing_line1_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskTime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_38"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="惠新西街南口地铁站公交站" />
|
||||
<View
|
||||
android:id="@+id/viewTaskInfoLine1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/sweeper_task_dividing_line2_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewTaskInfoLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/bg_shape_clean_mode"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_1"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskName"
|
||||
tools:text="9:00" />
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/preSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewTaskInfoLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/bg_shape_task_state_not_ready"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingTop="@dimen/dp_1"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_1"
|
||||
android:text="暂未准备"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvTaskTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskName" />
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/currentSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/preSubTask" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMore"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvTaskTime"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvTaskName" />
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/lastSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/currentSubTask" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewTaskInfoLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:background="@drawable/sweeper_task_dividing_line1_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskTime" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewTaskInfoLine1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/sweeper_task_dividing_line2_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewTaskInfoLine" />
|
||||
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/preSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewTaskInfoLine" />
|
||||
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/currentSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/preSubTask" />
|
||||
|
||||
<com.mogo.och.sweepercloud.view.SubTaskView
|
||||
android:id="@+id/lastSubTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/currentSubTask" />
|
||||
<TextView
|
||||
android:id="@+id/tvStartAuto"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:background="@drawable/sweeper_start_auto_not_running"
|
||||
android:gravity="center"
|
||||
android:text="启动自驾"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/module_mogo_och_sweeper_station_notice_text_size"
|
||||
android:visibility="visible"
|
||||
android:layout_weight="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.55"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/readyTaskBtn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sweeper_task_not_working"
|
||||
android:gravity="center"
|
||||
android:text="开始任务"
|
||||
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_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="0.55" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:background="@drawable/sweeper_line"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvStartAuto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:background="@drawable/sweeper_upload_autopoiltstate"
|
||||
android:gravity="center"
|
||||
android:text="启动自驾"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/module_mogo_och_sweeper_station_notice_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3,64 +3,51 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/tvSubTaskName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="惠新西街南口地铁站公交站"
|
||||
android:text="惠新西街南口地铁站公交站"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_87"
|
||||
android:maxLines="2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivManualDriving"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:lineSpacingExtra="@dimen/dp_2"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/ivSubTaskSelect"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@drawable/sweeper_icon_select_subtask"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvSubTaskName"
|
||||
android:layout_marginEnd="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:visibility="gone"/>
|
||||
android:id="@+id/ivManualDriving"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:src="@drawable/icon_manual_driving"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/ivSubTask"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_width="@dimen/dp_42"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:src="@drawable/sweeper_icon_not_select_subtask"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvSubTaskName"
|
||||
android:layout_marginEnd="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tvSubTaskDesc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvSubTaskName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textColor="#A6CEFF"
|
||||
tools:text="全程约384米,预计耗时19分钟"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/ivRightDownArrow"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@drawable/icon_right_down_arrow"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvSubTaskDesc"
|
||||
android:layout_marginStart="@dimen/dp_46"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivSubTask"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivSubTask"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivSubTask"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user