[6.5.0]修复行程总结Bug

This commit is contained in:
xuxinchao
2024-07-16 12:14:10 +08:00
parent 05133cd629
commit 23719b68bd
3 changed files with 14 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
private var tvEfficiencyNum: TextView ?= null //通行效率提升
private var travelRealityView: TravelRealityView ?= null
private val random = Random()
private var mileage: Float = 5000f //总里程
private var mileage: Float = 1000f //总里程
init {
this.mContext = context
@@ -107,8 +107,8 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
}
fun setOrderMileage(mileage: Float) {
if(mileage <= 0){
this.mileage = 5000f
if(mileage < 1000){
this.mileage = 1000f
}else{
this.mileage = mileage
}
@@ -120,7 +120,10 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
private fun showSummaryTipContent(){
ThreadUtils.runOnUiThread {
val vehicleServiceNum = AutopilotSummaryInfo.infoTipNum+ AutopilotSummaryInfo.vehicleTipNum + AutopilotSummaryInfo.vulnerableTipNum + AutopilotSummaryInfo.lightServicesNum + CallerAutoPilotStatusListenerManager.getRoadCount()
val smartRoadLen = random.nextInt(mileage.toInt())
var smartRoadLen = 1000
try {
smartRoadLen =random.nextInt(mileage.toInt())
}catch (_: Exception){}
if(isDriver){
tvSummaryZhiContent?.text = "全程 ${(mileage/1000).toInt()}km智慧道路护航 ${(smartRoadLen/1000)}km全息感知覆盖率 ${(smartRoadLen*100/mileage).toInt()}%,车辆服务次数${vehicleServiceNum}"
}else{

View File

@@ -6,18 +6,18 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.mogo.eagle.core.widget.RoundConstraintLayout
android:layout_width="@dimen/dp_618"
android:layout_height="@dimen/dp_988"
android:layout_width="@dimen/dp_680"
android:layout_height="@dimen/dp_1090"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/dp_91"
app:roundLayoutRadius="@dimen/dp_30">
android:layout_marginStart="@dimen/dp_65"
app:roundLayoutRadius="@dimen/dp_22">
<com.mogo.eagle.core.function.view.TravelRealityView
android:id="@+id/travelRealityView"
android:layout_width="@dimen/dp_618"
android:layout_height="@dimen/dp_988"
android:layout_width="@dimen/dp_680"
android:layout_height="@dimen/dp_1090"
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"