[6.5.0]修复行程总结Bug
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user