This commit is contained in:
zhongchao
2022-10-26 15:37:00 +08:00
parent 16c7bd9755
commit 5fcd887dff
10 changed files with 42 additions and 38 deletions

View File

@@ -62,6 +62,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
import com.mogo.eagle.core.function.hmi.ui.upgrade.UpgradeListAdapter
import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
@@ -574,7 +575,7 @@ class DebugSettingView @JvmOverloads constructor(
// 演示模式
tbIsDemoMode.setOnCheckedChangeListener { _, isChecked ->
CallerHmiManager.updateStatusBarRightView(isChecked,"demoMode", DemoModeView(context))
CallerHmiManager.updateStatusBarRightView(isChecked, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(isChecked)
if (!isChecked) {
//关闭美化模式时,通知工控机
@@ -1859,29 +1860,35 @@ class DebugSettingView @JvmOverloads constructor(
override fun updateBizData(type: String, state: Boolean, lock: Boolean, data: String?) {
when (type) {
BIZ_BEAUTY_MODE -> {
if(lock){
tbIsDemoMode.background = resources.getDrawable(R.drawable.radio_button_lock_background)
}else{
tbIsDemoMode.background = resources.getDrawable(R.drawable.radio_button_normal_background_right)
if (lock) {
tbIsDemoMode.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
tbIsDemoMode.background =
resources.getDrawable(R.drawable.radio_button_normal_background_right)
}
}
BIZ_RAIN_MODE -> {
if(lock){
tbIsRainMode.background = resources.getDrawable(R.drawable.radio_button_lock_background)
}else{
tbIsRainMode.background = resources.getDrawable(R.drawable.radio_button_normal_background_right)
if (lock) {
tbIsRainMode.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
tbIsRainMode.background =
resources.getDrawable(R.drawable.radio_button_normal_background_right)
}
}
BIZ_WARNING_UPLOAD -> {
if(lock){
tbReportWarning.background = resources.getDrawable(R.drawable.radio_button_lock_background)
}else{
if (lock) {
tbReportWarning.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
tbReportWarning.background = null
}
}
BIZ_BAG_RECORD -> {
if (lock) {
btnRecordBag.background = resources.getDrawable(R.drawable.radio_button_lock_background)
btnRecordBag.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
btnRecordBag.requestFocus()
btnRecordBag.background = null
@@ -1889,7 +1896,8 @@ class DebugSettingView @JvmOverloads constructor(
}
BIZ_FULL_LOG -> {
if (lock) {
tbLogCatch.background = resources.getDrawable(R.drawable.radio_button_lock_background)
tbLogCatch.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
tbLogCatch.requestFocus()
tbLogCatch.background = null

View File

@@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.ScreenUtils
import kotlinx.android.synthetic.main.view_status_bar.view.*
import java.util.concurrent.CopyOnWriteArrayList
class StatusBarView @JvmOverloads constructor(
context: Context,
@@ -26,7 +27,7 @@ class StatusBarView @JvmOverloads constructor(
LayoutInflater.from(context).inflate(R.layout.view_status_bar, this, true)
}
private val rightViewList = mutableListOf<String>()
private val rightViewList = CopyOnWriteArrayList<String>()
override fun onAttachedToWindow() {
super.onAttachedToWindow()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 467 B

View File

@@ -3,6 +3,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:orientation="horizontal">
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryView
@@ -13,7 +14,7 @@
<ImageView
android:id="@+id/ivBatteryCharge"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_26"
android:layout_height="@dimen/dp_22"
android:layout_marginStart="@dimen/dp_6"
android:scaleType="fitXY"
android:src="@drawable/battery_charge"