merge special relase to m1-p
This commit is contained in:
@@ -4,12 +4,14 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.*
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.cbMsgBoxDriver
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.msgBoxTipView
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -20,7 +22,7 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
):ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "DriverMsgBoxButtonView"
|
||||
@@ -28,21 +30,35 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
private val bgResources: Int
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.DriverMsgBoxButtonView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
bgResources = a.getResourceId(
|
||||
R.styleable.DriverMsgBoxButtonView_bgDrawable,
|
||||
R.drawable.selector_msg_box
|
||||
)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
private fun initView() {
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
|
||||
cbMsgBoxDriver.background = AppCompatResources.getDrawable(context, bgResources)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -59,9 +75,9 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
if (isShow) {
|
||||
msgBoxTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
} else {
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -82,7 +98,7 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
interface ClickListener {
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
@@ -83,8 +83,14 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
import kotlin.collections.component3
|
||||
import kotlin.collections.component4
|
||||
import kotlin.collections.set
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
@@ -1984,7 +1990,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
|
||||
}
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {
|
||||
|
||||
}
|
||||
/**
|
||||
* 吐司提示
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
|
||||
@@ -39,7 +39,7 @@ public class TapPositionView extends ConstraintLayout {
|
||||
tabN = findViewById(R.id.tap_n);
|
||||
tabD = findViewById(R.id.tap_d);
|
||||
typedArray = context.obtainStyledAttributes(attrs, R.styleable.TapPositionView);
|
||||
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)||AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)){
|
||||
tabP.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import planning.RoboSweeperTaskIndexOuterClass;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
|
||||
@@ -80,4 +80,8 @@
|
||||
<attr name="pnc_size" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="DriverMsgBoxButtonView">
|
||||
<attr name="bgDrawable" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user