[2.13.0-arch-opt]v2x code style

This commit is contained in:
zhongchao
2023-02-17 20:25:19 +08:00
parent 6cd9b5d76c
commit df3e018c30
89 changed files with 651 additions and 1131 deletions

View File

@@ -9,7 +9,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager

View File

@@ -6,7 +6,7 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
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.*

View File

@@ -9,8 +9,8 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager

View File

@@ -9,7 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R

View File

@@ -6,18 +6,15 @@ import android.util.AttributeSet
import android.view.*
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_passenger_msg_box_bubble.view.*

View File

@@ -6,7 +6,7 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
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_passenger_msg_box_button.view.*

View File

@@ -7,18 +7,16 @@ import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxListAdapter
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.*

View File

@@ -4,7 +4,6 @@ import android.content.Context
import android.util.AttributeSet
import android.util.TypedValue.COMPLEX_UNIT_PX
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.appcompat.content.res.AppCompatResources
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
@@ -17,7 +16,7 @@ import com.mogo.eagle.core.data.trafficlight.isRed
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
@@ -25,8 +24,6 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.zhjt.service_biz.BizConfig
import kotlinx.android.synthetic.main.view_pnc_actions.view.*
import me.jessyan.autosize.AutoSize
import me.jessyan.autosize.utils.AutoSizeUtils
import mogo.telematics.pad.MessagePad
class PncActionsView @JvmOverloads constructor(
@@ -52,16 +49,25 @@ class PncActionsView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
val a = context.obtainStyledAttributes(attrs, R.styleable.PncActionsView, defStyleAttr, 0)
bgResources = a.getResourceId(R.styleable.PncActionsView_background_resource, R.drawable.pnc_actions_bg)
topMargin = a.getResourceId(R.styleable.PncActionsView_pnc_top_margin,resources.getDimension(R.dimen.dp_30).toInt())
txtSize = a.getResourceId(R.styleable.PncActionsView_pnc_size,resources.getDimension(R.dimen.dp_34).toInt())
bgResources = a.getResourceId(
R.styleable.PncActionsView_background_resource,
R.drawable.pnc_actions_bg
)
topMargin = a.getResourceId(
R.styleable.PncActionsView_pnc_top_margin,
resources.getDimension(R.dimen.dp_30).toInt()
)
txtSize = a.getResourceId(
R.styleable.PncActionsView_pnc_size,
resources.getDimension(R.dimen.dp_34).toInt()
)
a.recycle()
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX,txtSize.toFloat())
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize.toFloat())
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerPlanningActionsListenerManager.addListener(TAG, this)
@@ -124,6 +130,9 @@ class PncActionsView @JvmOverloads constructor(
tvHmiPncActions.text = actions
}
}
} else {
this.background = null
tvHmiPncActions.text = ""
}
}

View File

@@ -2,14 +2,13 @@ package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
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
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
import com.mogo.eagle.core.function.api.datacenter.union.ILimitingVelocityListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.hmi.R
@@ -43,7 +42,6 @@ class LimitingVelocityView constructor(
if (limitingVelocity > 0) {
visibility = View.VISIBLE
tvLimitingVelocity.text = "$limitingVelocity"
Log.d("emArrow","limit : ${ DataSourceType.getName(sourceType)}")
tvLimitingSource.text = DataSourceType.getName(sourceType)
} else {
visibility = View.GONE

View File

@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.R

View File

@@ -8,12 +8,11 @@ import android.widget.FrameLayout
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
import com.mogo.eagle.core.function.api.datacenter.union.ILimitingVelocityListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import java.util.*
class SpeedPanelView @JvmOverloads constructor(
context: Context,