Merge branch 'dev_opt_2.15.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_opt_2.15.0
This commit is contained in:
@@ -689,18 +689,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isBeautyMode = isChecked
|
||||
}
|
||||
|
||||
tbDrawAiCloudFusion.isChecked = FunctionBuildConfig.isDrawAiCloudFusion
|
||||
//云端感知绘制
|
||||
tbDrawAiCloudFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isDrawAiCloudFusion = isChecked
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//roma
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
}
|
||||
|
||||
tbObuWarningFusionUnion.isChecked = FunctionBuildConfig.isObuWarningFusionUnion
|
||||
//ObuWarningFusionUnion
|
||||
tbObuWarningFusionUnion.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
@@ -48,7 +48,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
if (brakeLight == 1) { //刹车灯亮
|
||||
if (!isBrake) {
|
||||
isBrake = true
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
var appearAnimation = AlphaAnimation(0f, 1f)
|
||||
appearAnimation.duration = 300
|
||||
@@ -63,7 +63,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
} else { //不踩刹车,就消失
|
||||
if (isBrake) {
|
||||
isBrake = false
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
// scaleImageAndTv()
|
||||
var disappearAnimation = AlphaAnimation(1f, 0f)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
class RomaPassengerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IReceivedMsgListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "RomaPassengerView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_passenger_bg, this, true)
|
||||
setOnClickListener {
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
when (type) {
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
"0" -> {
|
||||
romaMode = true
|
||||
}
|
||||
"1" -> {
|
||||
romaMode = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_roma_bg.view.*
|
||||
|
||||
class RomaView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IReceivedMsgListener {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "RomaView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_bg, this, true)
|
||||
setOnClickListener {
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTelematicListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
when(type){
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
// 乘客端开启漫游
|
||||
"3" -> {
|
||||
romaMode = true
|
||||
ll_roma_bg.setBackgroundResource(R.drawable.romabg_press_select_bg)
|
||||
ivRomaView.setBackgroundResource(R.drawable.roma_press_select_bg)
|
||||
}
|
||||
// 乘客端关闭漫游
|
||||
"4" -> {
|
||||
romaMode = false
|
||||
ll_roma_bg.setBackgroundResource(R.drawable.roma_bg_selector)
|
||||
ivRomaView.setBackgroundResource(R.drawable.romafront_select_bg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -93,29 +93,25 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
super.disableTrafficLightCountDown()
|
||||
UiThreadHandler.post {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_325).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightSourceTV!!.visibility = VISIBLE
|
||||
mLightSourceDivider!!.visibility = VISIBLE
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceTV!!.setPadding(0, 0, 75, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
}
|
||||
mLightSourceTV!!.setPadding(0,0,75,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = GONE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +197,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
* @param lightSource 1:云端下发;2:自车感知; 3:OBU
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
UiThreadHandler.post {
|
||||
@@ -237,32 +233,27 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun resetView() {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
private fun resetView(){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源 ,由于需要知道来源,这里不在限制
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0, 0, 0, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = View.VISIBLE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -207,9 +207,6 @@ public class TrafficDataView extends ConstraintLayout implements
|
||||
if (speedTextView != null) {
|
||||
speedTextView.setText(String.valueOf(newSpeed));
|
||||
}
|
||||
if (speedImage != null) {
|
||||
speedImage.setBackgroundResource(newSpeed > 60 ? R.drawable.traffic_data_speed_warning : R.drawable.traffic_data_speed);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/romabg_normal_select" />
|
||||
</selector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#323C6F"
|
||||
android:endColor="#323C6F"
|
||||
android:angle="315"
|
||||
/>
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"
|
||||
/>
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="225"
|
||||
/>
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"
|
||||
/>
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/roma_normal_select_bg" />
|
||||
</selector>
|
||||
@@ -277,30 +277,6 @@
|
||||
android:textOn="关闭感知优化模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawAiCloudFusion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启云端感知绘制"
|
||||
android:textOn="关闭云端感知绘制"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawRomaMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启漫游模式"
|
||||
android:textOn="关闭漫游模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuWarningFusionUnion"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_roma_bg"
|
||||
android:layout_width="@dimen/dp_102"
|
||||
android:layout_height="@dimen/dp_102"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:background="@drawable/roma_bg_selector"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRomaView"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/romafront_select_bg" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_121"
|
||||
android:layout_height="@dimen/dp_121"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user