[2.10.0]bus司机端"出/收车"按钮
This commit is contained in:
@@ -40,6 +40,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy.IViewNotificationProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
@@ -87,8 +88,10 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.common.enums.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.android.synthetic.main.view_auto_pilot_check.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo_msg.MogoReportMsg
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
@@ -150,6 +153,8 @@ import java.util.*
|
||||
private var showingV2XTip: IReminder? = null
|
||||
private var roadVideoDialog: RoadVideoDialog? = null
|
||||
|
||||
private var busOperationStatus: IOchBusView? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
@@ -327,6 +332,14 @@ import java.util.*
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeBusOperationStatus(isOut: Boolean) {
|
||||
busOperationStatus?.changerOperationStatus(isOut)
|
||||
}
|
||||
|
||||
override fun setBusOperationView(view: IOchBusView) {
|
||||
busOperationStatus = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
|
||||
@@ -13,12 +13,14 @@ import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.temp.EventBusOperation
|
||||
import com.mogo.eagle.core.data.temp.EventLogout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
@@ -154,15 +156,13 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
EventBus.getDefault().post(EventLogout())
|
||||
}
|
||||
|
||||
ochBusOperationStatus.onClick {
|
||||
EventBus.getDefault().post(EventLogout())
|
||||
}
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
actvLoginout.visibility = View.VISIBLE
|
||||
}
|
||||
"fPadLenovoOchBus" ->{
|
||||
ochBusOperationRL.visibility = View.VISIBLE
|
||||
CallerHmiManager.setBusOperationView(toolBusOperationView)
|
||||
EventBus.getDefault().post(EventBusOperation(0))
|
||||
}
|
||||
else -> {
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.temp.EventBusOperation
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_och_bus_operation.view.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/8/23
|
||||
*/
|
||||
class BusOperationView @JvmOverloads constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0)
|
||||
: IOchBusView(context, attrs, defStyleAttr), View.OnClickListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_och_bus_operation,this,true)
|
||||
ochBusOperationStatus.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun showBusOperation() {
|
||||
ochBusOperationStatus.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changerOperationStatus(isOut: Boolean) {
|
||||
if (isOut){
|
||||
ochBusOperationStatusCTV.setText("收车")
|
||||
}else{
|
||||
ochBusOperationStatusCTV.setText("出车")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
EventBus.getDefault().post(EventBusOperation(1))
|
||||
}
|
||||
}
|
||||
@@ -255,49 +255,12 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewSystemVersion" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ochBusOperationRL"
|
||||
<com.mogo.eagle.core.function.hmi.ui.tools.BusOperationView
|
||||
android:id="@+id/toolBusOperationView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40px"
|
||||
android:layout_marginBottom="40px"
|
||||
app:layout_constraintTop_toBottomOf="@+id/systemVersionView"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<View android:id="@+id/bus_operation_view"
|
||||
android:layout_width="14px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginStart="80px"
|
||||
android:background="@color/color_FF2966EC"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bus_operation_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="113px"
|
||||
android:gravity="center"
|
||||
android:text="@string/bus_operation_title"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42px" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ochBusOperationStatus"
|
||||
android:layout_width="@dimen/och_bus_operation_status_bg_width"
|
||||
android:layout_height="@dimen/och_bus_operation_status_bg_height"
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="出车"
|
||||
android:textAlignment="center"
|
||||
android:layout_marginStart="113px"
|
||||
android:layout_marginTop="40px"
|
||||
android:textColor="@drawable/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_below="@+id/tv_bus_operation_title"/>
|
||||
|
||||
</RelativeLayout>
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actvLoginout"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ochBusOperationStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40px"
|
||||
android:paddingBottom="40px"
|
||||
tools:ignore="DuplicateIds">
|
||||
|
||||
<View
|
||||
android:id="@+id/bus_operation_view"
|
||||
android:layout_width="14px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginStart="80px"
|
||||
android:background="@color/color_FF2966EC" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bus_operation_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="113px"
|
||||
android:gravity="center"
|
||||
android:text="@string/bus_operation_title"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42px" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ochBusOperationStatusCTV"
|
||||
android:layout_width="@dimen/och_bus_operation_status_bg_width"
|
||||
android:layout_height="@dimen/och_bus_operation_status_bg_height"
|
||||
android:layout_below="@+id/tv_bus_operation_title"
|
||||
android:layout_marginStart="113px"
|
||||
android:layout_marginTop="40px"
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="出车"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@drawable/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user