[6.7.0] fix bug
This commit is contained in:
@@ -5,6 +5,7 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.enums.Carmodel
|
||||
import com.mogo.eagle.core.function.api.och.IOchFunctionCall
|
||||
import com.mogo.eagle.core.function.call.och.CallerOchFunctionCallManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -40,12 +41,8 @@ class BoneContainerView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
clBoneTab.loginOut { //todo 判断没有logout caller出去
|
||||
if(logOut != null){
|
||||
logOut?.invoke()
|
||||
}else{
|
||||
|
||||
}
|
||||
clBoneTab.loginOut {
|
||||
CallerOchFunctionCallManager.invokeLoginOut()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +54,7 @@ class BoneContainerView @JvmOverloads constructor(
|
||||
this.logOut = logOut
|
||||
}
|
||||
|
||||
override fun invokeCarMode(carModel: String?) {
|
||||
override fun invokeCarMode(carModel: Carmodel?) {
|
||||
super.invokeCarMode(carModel)
|
||||
clBoneTab.setCarMode(carModel)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.enums.Carmodel
|
||||
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
|
||||
@@ -92,7 +93,7 @@ class BoneTabLayout @JvmOverloads constructor(
|
||||
carInfoTabView.setLoginInfo(loginNo)
|
||||
}
|
||||
|
||||
fun setCarMode(carModel: String?) {
|
||||
fun setCarMode(carModel: Carmodel?) {
|
||||
carInfoTabView.setCarMode(carModel)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.enums.Carmodel
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
@@ -168,19 +169,13 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun setCarMode(carModel:String?){
|
||||
fun setCarMode(carModel: Carmodel?){
|
||||
UiThreadHandler.post {
|
||||
if(carModel.isNullOrEmpty()){
|
||||
if(carModel == null){
|
||||
ivCarType.visibility = GONE
|
||||
}else{
|
||||
ivCarType.visibility = VISIBLE
|
||||
when(carModel){
|
||||
"b1" -> ivCarType.setImageResource(R.drawable.icon_car_b1)
|
||||
"b2" -> ivCarType.setImageResource(R.drawable.icon_car_b2)
|
||||
"t1" -> ivCarType.setImageResource(R.drawable.icon_car_t1)
|
||||
"t2" -> ivCarType.setImageResource(R.drawable.icon_car_t2)
|
||||
"m1" -> ivCarType.setImageResource(R.drawable.icon_car_m1)
|
||||
}
|
||||
ivCarType.setImageResource(carModel.resId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,15 +119,12 @@ class RoadCrossCameraManager : IMoGoMapRoadListener {
|
||||
val builder =
|
||||
Point.Options.Builder(TAG, Level.MAP_MARKER)
|
||||
.setId(cameraDeviceInfo.deviceIp)
|
||||
// .anchor(0.5f, 1f)
|
||||
.anchor(0.5f, 0.5f)
|
||||
// .scale(0.6f)
|
||||
.anchor(0.5f, 1f)
|
||||
.scale(1.3f)
|
||||
.set3DMode(true)
|
||||
// .flat(false)
|
||||
.isUseGps(true)
|
||||
.controlAngle(false)
|
||||
.icon3DRes(R.raw.cross_road_camera)
|
||||
// .icon(BitmapFactory.decodeResource(it.resources, R.drawable.road_camera))
|
||||
.moveToCenter(false)
|
||||
.longitude(cameraDeviceInfo.lon)
|
||||
.latitude(cameraDeviceInfo.lat)
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
|
||||
class CameraMarkerView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs, defStyleAttr),
|
||||
IMoGoSkinModeChangeListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "CameraMarkerView"
|
||||
}
|
||||
|
||||
init {
|
||||
if (this.layoutParams == null) {
|
||||
this.setLayoutParams(
|
||||
ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
)
|
||||
}
|
||||
modeChange(CallerSkinModeListenerManager.getMode())
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
modeChange(skinMode)
|
||||
}
|
||||
}
|
||||
|
||||
private fun modeChange(mode: Int) {
|
||||
when (mode) {
|
||||
0 -> {
|
||||
setImageResource(R.drawable.map_marker_camera_view_select)
|
||||
resize(106, 121)
|
||||
}
|
||||
1 -> {
|
||||
setImageResource(R.drawable.map_marker_camera_view_right_light_select)
|
||||
resize(74, 83)
|
||||
}
|
||||
else -> {
|
||||
setImageResource(R.drawable.map_marker_camera_view_select)
|
||||
resize(106, 121)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun resize(width: Int, height: Int) {
|
||||
//设置宽高
|
||||
val params = layoutParams
|
||||
params.width = AutoSizeUtils.dp2px(context, width.toFloat())
|
||||
params.height = AutoSizeUtils.dp2px(context, height.toFloat())
|
||||
layoutParams = params
|
||||
requestLayout()
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -192,22 +192,22 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
|
||||
private fun attachView() {
|
||||
// 没有路线不做提示
|
||||
// if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
|
||||
// return
|
||||
// }
|
||||
// // 处于漫游模式下不做处理
|
||||
// if (CallerMapIdentifyManager.roam.second) {
|
||||
// if (CallerMapIdentifyManager.roam.first != TAG) {
|
||||
// ToastUtils.showLong("正在漫游中,不展示路口漫游")
|
||||
// }
|
||||
// CallerLogger.d("$M_MAP$TAG", "正在漫游中,不展示路口漫游")
|
||||
// return
|
||||
// }
|
||||
// // 首页被遮挡不做提示
|
||||
// if (!CallerHmiViewControlListenerManager.getMainPageVisible()) {
|
||||
// CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
|
||||
// return
|
||||
// }
|
||||
if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
|
||||
return
|
||||
}
|
||||
// 处于漫游模式下不做处理
|
||||
if (CallerMapIdentifyManager.roam.second) {
|
||||
if (CallerMapIdentifyManager.roam.first != TAG) {
|
||||
ToastUtils.showLong("正在漫游中,不展示路口漫游")
|
||||
}
|
||||
CallerLogger.d("$M_MAP$TAG", "正在漫游中,不展示路口漫游")
|
||||
return
|
||||
}
|
||||
// 首页被遮挡不做提示
|
||||
if (!CallerHmiViewControlListenerManager.getMainPageVisible()) {
|
||||
CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
|
||||
return
|
||||
}
|
||||
//播放语音
|
||||
val dis = CallerMapRoadListenerManager.getStopLineDistance()?.toInt() ?: 0
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
Reference in New Issue
Block a user