diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt index 0150980a70..6dd760a6a9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt @@ -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{ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml index fc422801ca..5ef3c11f73 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml @@ -6,18 +6,18 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> + android:layout_marginStart="@dimen/dp_65" + app:roundLayoutRadius="@dimen/dp_22"> 1003dp 1017dp 1055dp + 1090dp 1092dp 1100dp 1125dp