[6.6.0]红绿灯UI改版
This commit is contained in:
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
@@ -21,9 +22,8 @@ import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils.*
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.hmi_view_traffic_light.view.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* 新版红绿灯view
|
||||
@@ -39,11 +39,14 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
private const val TAG = "SingleTrafficLightView"
|
||||
}
|
||||
|
||||
private var mLightIconIV: ImageView? = null
|
||||
private var mLightIconBG: ImageView? = null
|
||||
private var mLightTimeTV: GradientTextView? = null
|
||||
private var mLightSourceTV: TextView? = null
|
||||
private var mLightSourceDivider: View? = null
|
||||
private var mLightIconIV: ImageView? = null //红绿灯Icon
|
||||
private var mLightIconBG: ImageView? = null //乘客屏红绿灯背景
|
||||
private var mTrafficLightClBG: ConstraintLayout ?= null //司机端红绿灯背景
|
||||
private var mLightTimeTV: TypefaceTextView ?= null //司机端红绿灯倒计时
|
||||
private var mLightTimeTVP: GradientTextView? = null //乘客屏红绿灯倒计时
|
||||
private var mLightSourceTV: TextView? = null //红绿灯来源
|
||||
private var mLightSourceDivider: View? = null //分割线
|
||||
|
||||
private var mCurrentLightId = TrafficLightEnum.BLACK
|
||||
|
||||
private var fusionTrafficLightState: Boolean = false //当前是否有融合红绿灯展示
|
||||
@@ -52,8 +55,8 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
|
||||
init{
|
||||
context?.let {
|
||||
val typedArray = it.obtainStyledAttributes(attrs, R.styleable.TrafficLightView)
|
||||
trafficLightUser = typedArray.getInt(R.styleable.TrafficLightView_traffic_light_user,0)
|
||||
val typedArray = it.obtainStyledAttributes(attrs, R.styleable.SingleTrafficLightView)
|
||||
trafficLightUser = typedArray.getInt(R.styleable.SingleTrafficLightView_traffic_light_user,0)
|
||||
typedArray.recycle()
|
||||
}
|
||||
|
||||
@@ -67,19 +70,24 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_traffic_light, this, true)
|
||||
}
|
||||
mLightIconIV = findViewById(R.id.hmi_traffic_light_iv)
|
||||
mLightIconBG = findViewById(R.id.hmi_traffic_light_bg)
|
||||
mLightTimeTV = findViewById(R.id.hmi_traffic_light_time_tv)
|
||||
mLightSourceTV = findViewById(R.id.hmi_traffic_light_source)
|
||||
mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider)
|
||||
if(trafficLightUser==1){
|
||||
mLightIconBG = findViewById(R.id.hmi_traffic_light_bg)
|
||||
mLightTimeTVP = findViewById(R.id.hmi_traffic_light_time_tv_p)
|
||||
}else{
|
||||
mTrafficLightClBG = findViewById(R.id.hmi_traffic_light_cl_bg)
|
||||
mLightTimeTV = findViewById(R.id.hmi_traffic_light_time_tv)
|
||||
}
|
||||
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TrafficLightView_TAG, this)
|
||||
|
||||
if(trafficLightUser==1){
|
||||
hmi_traffic_light_bg.setBackgroundResource(R.drawable.traffic_light_bg_taxi_p)
|
||||
hmi_traffic_light_source.setTextColor(ContextCompat.getColor(context,R.color.color_FF213757))
|
||||
hmi_traffic_light_divider.setBackgroundColor(ContextCompat.getColor(context,R.color.color_CC5C71AB))
|
||||
mLightIconBG?.setBackgroundResource(R.drawable.traffic_light_bg_taxi_p)
|
||||
mLightSourceTV?.setTextColor(ContextCompat.getColor(context,R.color.color_FF213757))
|
||||
mLightSourceDivider?.setBackgroundColor(ContextCompat.getColor(context,R.color.color_CC5C71AB))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,20 +104,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
runOnUiThread {
|
||||
when (skinMode) {
|
||||
0 -> {
|
||||
hmi_traffic_light_bg.setBackgroundResource(R.drawable.traffic_light_bg)
|
||||
hmi_traffic_light_source.setTextColor(ContextCompat.getColor(context,R.color.color_FFFFFF))
|
||||
hmi_traffic_light_divider.setBackgroundColor(ContextCompat.getColor(context,R.color.color_FFFFFF))
|
||||
}
|
||||
1 -> {
|
||||
hmi_traffic_light_bg.setBackgroundResource(R.drawable.traffic_light_bg_day_light)
|
||||
hmi_traffic_light_source.setTextColor(ContextCompat.getColor(context,R.color.color_2D3E5F))
|
||||
hmi_traffic_light_divider.setBackgroundColor(ContextCompat.getColor(context,R.color.color_2D3E5F))
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO 670版本UI改版没有设计白天黑夜模式,暂时关闭
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,30 +153,27 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯计数
|
||||
*/
|
||||
override fun disableTrafficLightCountDown() {
|
||||
super.disableTrafficLightCountDown()
|
||||
UiThreadHandler.post {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
// 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()
|
||||
// }
|
||||
if(trafficLightUser==1){
|
||||
//乘客屏
|
||||
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
|
||||
mLightTimeTVP?.visibility = GONE
|
||||
mLightSourceTV?.setPadding(0, 0, 75, 0)
|
||||
mLightIconBG?.layoutParams?.width =
|
||||
context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
}else{
|
||||
//司机屏
|
||||
//TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +190,13 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
TrafficLightEnum.RED -> changeCountdownRed(redNum)
|
||||
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
|
||||
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
|
||||
else -> UiThreadHandler.post { mLightTimeTV!!.text = "" }
|
||||
else -> UiThreadHandler.post {
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTVP?.text = ""
|
||||
}else{
|
||||
mLightTimeTV?.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,27 +206,25 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
if (redNum > 0) {
|
||||
resetView()
|
||||
mLightTimeTV!!.setVertical(true)
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTV!!.setColorList(
|
||||
mLightTimeTVP?.setVertical(true)
|
||||
mLightTimeTVP?.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E),
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E)
|
||||
)
|
||||
)
|
||||
mLightTimeTVP?.text = redNum.toString()
|
||||
}else{
|
||||
mLightTimeTV!!.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_red_color_up),
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_red_color_down)
|
||||
)
|
||||
)
|
||||
mLightTimeTV?.text = redNum.toString()
|
||||
}
|
||||
|
||||
mLightTimeTV!!.text = redNum.toString()
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTVP?.text = ""
|
||||
}else{
|
||||
mLightTimeTV?.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,26 +234,26 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
if (greenNum > 0) {
|
||||
resetView()
|
||||
mLightTimeTV!!.setVertical(true)
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTV!!.setColorList(
|
||||
mLightTimeTVP?.setVertical(true)
|
||||
mLightTimeTVP?.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E),
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E)
|
||||
)
|
||||
)
|
||||
mLightTimeTVP?.text = greenNum.toString()
|
||||
}else{
|
||||
mLightTimeTV!!.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_green_color_up),
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_green_color_down)
|
||||
)
|
||||
)
|
||||
mLightTimeTV?.text = greenNum.toString()
|
||||
}
|
||||
mLightTimeTV!!.text = greenNum.toString()
|
||||
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTVP!!.text = ""
|
||||
}else{
|
||||
mLightTimeTV!!.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,26 +263,25 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
if (yellowNum > 0) {
|
||||
resetView()
|
||||
mLightTimeTV!!.setVertical(true)
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTV!!.setColorList(
|
||||
mLightTimeTVP?.setVertical(true)
|
||||
mLightTimeTVP?.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E),
|
||||
ContextCompat.getColor(context,R.color.color_FF384D6E)
|
||||
)
|
||||
)
|
||||
mLightTimeTVP?.text = yellowNum.toString()
|
||||
}else{
|
||||
mLightTimeTV!!.setColorList(
|
||||
intArrayOf(
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_yellow_color_up),
|
||||
ContextCompat.getColor(context,R.color.hmi_traffic_light_yellow_color_down)
|
||||
)
|
||||
)
|
||||
mLightTimeTV?.text = yellowNum.toString()
|
||||
}
|
||||
mLightTimeTV!!.text = yellowNum.toString()
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
if(trafficLightUser == 1){
|
||||
mLightTimeTVP?.text = ""
|
||||
}else{
|
||||
mLightTimeTV?.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,50 +327,56 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
else -> this@SingleTrafficLightView.visibility = GONE
|
||||
}
|
||||
when (lightSource) {
|
||||
//TODO 司机屏展示来源需要更改文案
|
||||
DataSourceType.AICLOUD -> {
|
||||
mLightSourceTV!!.text = context.getString(R.string.light_source_ai_cloud)
|
||||
if(trafficLightUser == 1){
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_ai_cloud)
|
||||
}else{
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_driver_ai_cloud)
|
||||
}
|
||||
}
|
||||
DataSourceType.TELEMATIC_UNION_V2I,
|
||||
DataSourceType.TELEMATIC_UNION_V2N,
|
||||
DataSourceType.TELEMATIC -> {
|
||||
mLightSourceTV!!.text = context.getString(R.string.light_source_perception)
|
||||
}
|
||||
DataSourceType.TELEMATIC_UNION_V2I -> {
|
||||
mLightSourceTV!!.text = context.getString(R.string.light_source_perception_v2i)
|
||||
}
|
||||
DataSourceType.TELEMATIC_UNION_V2N -> {
|
||||
mLightSourceTV!!.text = context.getString(R.string.light_source_perception_v2n)
|
||||
if(trafficLightUser == 1){
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_perception)
|
||||
}else{
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_driver_perception)
|
||||
}
|
||||
}
|
||||
DataSourceType.OBU -> {
|
||||
mLightSourceTV!!.text = context.getString(R.string.light_source_obu)
|
||||
if(trafficLightUser == 1){
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_obu)
|
||||
}else{
|
||||
mLightSourceTV?.text = context.getString(R.string.light_source_driver_obu)
|
||||
mLightSourceTV?.textSize = AutoSizeUtils.sp2px(context, 23f).toFloat()
|
||||
mLightSourceTV?.setLineSpacing(0f, 1.0f)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
mLightSourceTV!!.visibility = GONE
|
||||
mLightSourceTV?.visibility = GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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()
|
||||
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()
|
||||
// }
|
||||
if(trafficLightUser == 1){
|
||||
//乘客屏
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
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{
|
||||
//司机屏
|
||||
//TODO
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 20 KiB |
@@ -1,60 +1,58 @@
|
||||
<?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="@dimen/hmi_traffic_light_bus_layout_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_layout_height"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_bg"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bus_bg_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_bg_height"
|
||||
android:layout_marginStart="@dimen/hmi_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_bg_margin_top"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
android:id="@+id/hmi_traffic_light_cl_bg"
|
||||
android:layout_width="@dimen/dp_368"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:background="@drawable/icon_single_traffic_light_bg"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_iv"
|
||||
android:layout_width="@dimen/hmi_traffic_light_icon_size"
|
||||
android:layout_height="@dimen/hmi_traffic_light_icon_size"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.GradientTextView
|
||||
android:id="@+id/hmi_traffic_light_time_tv"
|
||||
android:layout_width="@dimen/hmi_traffic_light_time_view_width"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/hmi_traffic_light_time_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:contentDescription="@string/traffic_light_status"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/hmi_traffic_light_time_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/hmi_traffic_light_iv"
|
||||
android:layout_marginStart="-40dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_80"
|
||||
app:textType="DS_DIGIB_2"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/hmi_traffic_light_divider"
|
||||
android:layout_width="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="#999999"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_source"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hmi_traffic_light_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="自车感知"
|
||||
android:textSize="@dimen/hmi_traffic_light_source_size"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:orientation="vertical"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginEnd="@dimen/dp_65"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/hmi_traffic_light_divider"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_source"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -28,7 +28,7 @@
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.GradientTextView
|
||||
android:id="@+id/hmi_traffic_light_time_tv"
|
||||
android:id="@+id/hmi_traffic_light_time_tv_p"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TrafficLightView">
|
||||
<declare-styleable name="SingleTrafficLightView">
|
||||
<attr name="traffic_light_user">
|
||||
<enum name="traffic_light_taxi_p" value="1" />
|
||||
</attr>
|
||||
|
||||
@@ -102,10 +102,13 @@
|
||||
<string name="traffic_light_status">红绿灯灯态</string>
|
||||
<!--红绿灯数据来源-->
|
||||
<string name="light_source_ai_cloud">云端下发</string>
|
||||
<string name="light_source_driver_ai_cloud">云\n端</string>
|
||||
<string name="light_source_perception">自车感知</string>
|
||||
<string name="light_source_driver_perception">自\n车</string>
|
||||
<string name="light_source_perception_v2i">融合V2I</string>
|
||||
<string name="light_source_perception_v2n">融合V2N</string>
|
||||
<string name="light_source_obu">\u2000OBU\u2000</string>
|
||||
<string name="light_source_driver_obu">O\nB\nU</string>
|
||||
<string name="parallel_drive">远程代驾</string>
|
||||
<string name="parallel_drive_requesting">请求中...</string>
|
||||
<string name="parallel_drive_synchronizing">同步中...</string>
|
||||
|
||||
Reference in New Issue
Block a user