[2.13.2-arch-opt] fix bug of limit
This commit is contained in:
@@ -2,6 +2,7 @@ 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
|
||||
@@ -12,6 +13,7 @@ import com.mogo.eagle.core.function.api.v2x.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
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import kotlinx.android.synthetic.main.view_limiting_speed_vr.view.*
|
||||
|
||||
/**
|
||||
@@ -37,15 +39,16 @@ class LimitingVelocityView constructor(
|
||||
}
|
||||
|
||||
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
|
||||
if (limitingVelocity > 0) {
|
||||
this.visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource.visibility = View.VISIBLE
|
||||
tvLimitingSource.text = sourceType.name
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
tvLimitingSource.visibility = View.GONE
|
||||
tvLimitingSource.text = ""
|
||||
ThreadUtils.runOnUiThread {
|
||||
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
|
||||
tvLimitingSource.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:text="123"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
|
||||
Reference in New Issue
Block a user