[6.5.0]红绿灯提示优化
This commit is contained in:
@@ -60,6 +60,12 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
}
|
||||
val endTime = System.nanoTime()
|
||||
val internal = TimeUnit.NANOSECONDS.toMillis(endTime - startTime)
|
||||
if(internal > 700){
|
||||
UiThreadHandler.post {
|
||||
tvTrafficNum?.text = "0."
|
||||
tvTrafficNumDecimal?.text = "00"
|
||||
}
|
||||
}
|
||||
if(internal>1500){
|
||||
UiThreadHandler.post{
|
||||
this@TrafficLightPromptView.visibility = GONE
|
||||
@@ -159,7 +165,7 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
tvTrafficNumDecimal?.text = (currentDuration*100 - currentDuration.toInt()*100).toInt().toString()
|
||||
}else{
|
||||
tvTrafficNum?.text = "0."
|
||||
tvTrafficNumDecimal?.text = "0"
|
||||
tvTrafficNumDecimal?.text = "00"
|
||||
this@TrafficLightPromptView.visibility = View.GONE
|
||||
}
|
||||
when(nextState){
|
||||
|
||||
Reference in New Issue
Block a user