diff --git a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml
index 564aa1e394..95eaa395d2 100644
--- a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml
+++ b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml
@@ -26,16 +26,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
-
-
-
-
-
-
Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
+//package com.mogo.och.bus.passenger;
+//
+//import org.junit.Test;
+//
+//import static org.junit.Assert.*;
+//
+///**
+// * Example local unit test, which will execute on the development machine (host).
+// *
+// * @see Testing documentation
+// */
+//public class ExampleUnitTest {
+// @Test
+// public void addition_isCorrect() {
+// assertEquals(4, 2 + 2);
+// }
+//}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml
index da6d779a3b..fae3e46139 100644
--- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml
+++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml
@@ -56,11 +56,27 @@
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginTop="45dp"
- android:layout_marginEnd="40dp"
app:layout_constraintRight_toLeftOf="@id/viewTrafficLightVr"
app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="SpeakableTextPresentCheck"
tools:visibility="visible" />
+
+
+
+ app:layout_constraintStart_toStartOf="parent"
+ tools:ignore="SpeakableTextPresentCheck" />
+
+ app:layout_constraintTop_toBottomOf="@id/btnAutopilotArrive"
+ tools:ignore="TextContrastCheck" />
(),
true
}
- cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
- if (isChecked) {
- viewDriverMsgBoxList.visibility = View.VISIBLE
- viewDriverMsgBoxList.notifyData()
- viewDriverMsgBoxBubble.visibility = View.GONE
- viewDriverMsgBoxBubble.isShowData(false)
- MsgBoxTipView.visibility = View.GONE
- } else {
- viewDriverMsgBoxList.visibility = View.GONE
- viewDriverMsgBoxBubble.visibility = View.VISIBLE
- viewDriverMsgBoxBubble.isShowData(true)
- }
- }
-
- cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
- if (isChecked) {
- viewPassengerMsgBoxList.visibility = View.VISIBLE
- viewPassengerMsgBoxBubble.visibility = View.GONE
- viewPassengerMsgBoxBubble.isShowData(false)
- MsgBoxTipView.visibility = View.GONE
- } else {
- viewPassengerMsgBoxList.visibility = View.GONE
- viewPassengerMsgBoxBubble.visibility = View.VISIBLE
- viewPassengerMsgBoxBubble.isShowData(true)
- }
- }
+// cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
+// if (isChecked) {
+// viewDriverMsgBoxList.visibility = View.VISIBLE
+// viewDriverMsgBoxList.notifyData()
+// viewDriverMsgBoxBubble.visibility = View.GONE
+// viewDriverMsgBoxBubble.isShowData(false)
+// MsgBoxTipView.visibility = View.GONE
+// } else {
+// viewDriverMsgBoxList.visibility = View.GONE
+// viewDriverMsgBoxBubble.visibility = View.VISIBLE
+// viewDriverMsgBoxBubble.isShowData(true)
+// }
+// }
}
diff --git a/OCH/mogo-och-noop/src/main/res/layout/och_noop_fragment_hmi.xml b/OCH/mogo-och-noop/src/main/res/layout/och_noop_fragment_hmi.xml
index 34c117a11e..a5ff126179 100644
--- a/OCH/mogo-och-noop/src/main/res/layout/och_noop_fragment_hmi.xml
+++ b/OCH/mogo-och-noop/src/main/res/layout/och_noop_fragment_hmi.xml
@@ -80,6 +80,23 @@
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
+
+
+
+ app:layout_goneMarginStart="50dp"
+ android:contentDescription="工具箱"/>
+ app:layout_constraintStart_toEndOf="@id/ivToolsView"
+ android:contentDescription="BadCase"/>
+ app:layout_constraintStart_toEndOf="@id/ivBadCaseTools"
+ android:contentDescription="数据采集" />
-
-
-
-
-
-
-
-
-
+ app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
+ tools:visibility="gone"/>
-
-
-
-
+ app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
+ tools:visibility="gone" />
-
-
-
-
-
-
+
+
+
(){
+class DriverMsgBoxListAdapter(private val context: Context) : RecyclerView.Adapter(){
private var data: List ?= null
@@ -39,10 +40,13 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
private val record: Int = 6
private val traffic: Int = 7
- //Error
- val RESULT_AUTOPILOT_DISABLE = "RESULT_AUTOPILOT_DISABLE"
- val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
- val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
+ companion object{
+ //Error
+ private const val RESULT_AUTOPILOT_DISABLE = "RESULT_AUTOPILOT_DISABLE"
+ private const val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
+ private const val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
+ }
+
fun setData(data: List){
this.data = data
@@ -77,7 +81,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
val msgBoxBean = it[position]
holder.tvRecordCheck.setOnClickListener {
//打开被动录包弹窗
- CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
+ CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,false)
}
}
}else if(holder is MsgBoxIpcReportHolder){
@@ -180,7 +184,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvNoticeContent.text = noticeNormalData?.content
- GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
+ GlideApp.with(context).load(noticeNormalData?.imageUrl).optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
@@ -194,7 +198,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
- GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
+ GlideApp.with(context).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
@@ -214,10 +218,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvV2XContent.text = v2XMsg.content
if(msgBoxBean.type == MsgBoxType.OBU){
- holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
+ holder.ivV2XImage.setImageDrawable(context.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}else{
- holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
+ holder.ivV2XImage.setImageDrawable(context.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/switch/DemoModeHiddenSwitch.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/switch/DemoModeHiddenSwitch.kt
index ff65be7e7a..626c5f3861 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/switch/DemoModeHiddenSwitch.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/switch/DemoModeHiddenSwitch.kt
@@ -10,23 +10,21 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
-class DemoModeHiddenSwitch(context: Context?, attrs: AttributeSet?) : View(context, attrs) {
+class DemoModeHiddenSwitch(context: Context, attrs: AttributeSet?) : View(context, attrs) {
- override fun onAttachedToWindow() {
- super.onAttachedToWindow()
+ init {
+ isClickable = true
setOnClickListener {
//只在司机端设置美化模式开关功能
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
- context?.let {
- CallerHmiManager.updateStatusBarLeftView(
- FunctionBuildConfig.isDemoMode,
- "demoMode",
- DemoModeView(it)
- )
- }
+ CallerHmiManager.updateStatusBarLeftView(
+ FunctionBuildConfig.isDemoMode,
+ "demoMode",
+ DemoModeView(context)
+ )
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/LimitingVelocityView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/LimitingVelocityView.kt
index 6df4d6b3c2..d4b8509a07 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/LimitingVelocityView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/LimitingVelocityView.kt
@@ -4,7 +4,7 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
-import android.widget.LinearLayout
+import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.LimitingVelocityView_TAG
@@ -17,11 +17,10 @@ import kotlinx.android.synthetic.main.view_limiting_speed_vr.view.*
/**
* 限速控件
*/
-class LimitingVelocityView @JvmOverloads constructor(
+class LimitingVelocityView constructor(
context: Context,
attrs: AttributeSet? = null,
- defStyleAttr: Int = 0
-) : LinearLayout(context, attrs, defStyleAttr), ILimitingVelocityListener, IViewControlListener {
+) : ConstraintLayout(context, attrs), ILimitingVelocityListener, IViewControlListener {
companion object {
private const val TAG = "LimitingVelocityView"
@@ -39,21 +38,18 @@ class LimitingVelocityView @JvmOverloads constructor(
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
if (limitingVelocity > 0) {
- tvLimitingVelocity.visibility = View.VISIBLE
- tvLimitingSource.visibility = View.VISIBLE
+ this.visibility = View.VISIBLE
tvLimitingVelocity.text = "$limitingVelocity"
tvLimitingSource.text = sourceType.name
} else {
- tvLimitingVelocity.visibility = View.GONE
- tvLimitingSource.visibility = View.GONE
+ this.visibility = View.GONE
tvLimitingSource.text = ""
}
}
override fun visible(v: Int) {
super.visible(v)
- tvLimitingVelocity.visibility = v
- tvLimitingSource.visibility = v
+ this.visibility = v
}
override fun onDetachedFromWindow() {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
index 12ff7aa0bc..d96ffd36c6 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
@@ -52,7 +52,7 @@ class VersionNameView @JvmOverloads constructor(
@SuppressLint("SetTextI18n")
private fun showCurrentPadVersion() {
tvAppVersionName?.let {
- it.text = "APP:${AppUtils.getAppVersionName()}"
+// it.text = "APP:${AppUtils.getAppVersionName()}"
}
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
index 56b54cc6dd..9cfb39d1e0 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
@@ -21,43 +21,6 @@
android:layout_height="match_parent"
android:paddingTop="72dp">
-
-
-
-
-
-
-
-
+
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml
index e3c35e2bfc..fb6060c188 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml
@@ -1,14 +1,16 @@
-
-
\ No newline at end of file
+
\ No newline at end of file