[6.5.0]UI调整+全息路口数据来源更改
This commit is contained in:
@@ -105,7 +105,6 @@ class FusionTrafficLightView @JvmOverloads constructor(
|
||||
//如果当前红绿灯视图为隐藏状态则设置为显示状态
|
||||
if(this@FusionTrafficLightView.visibility == View.GONE){
|
||||
this@FusionTrafficLightView.visibility = View.VISIBLE
|
||||
AutopilotSummaryInfo.intersectionServicesNum++
|
||||
AutopilotSummaryInfo.lightServicesNum++
|
||||
//首次展示,需要将当前、下一、下二灯态的时间占比绘制出来,只绘制一次
|
||||
val proportionList = intArrayOf(0, 0, 0)
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.os.Bundle
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.util.Random
|
||||
@@ -59,7 +60,6 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
//对本次服务记录清零
|
||||
AutopilotSummaryInfo.totalLength = 0
|
||||
AutopilotSummaryInfo.vehicleServiceNum = 0
|
||||
AutopilotSummaryInfo.intersectionServicesNum = 0
|
||||
AutopilotSummaryInfo.lightServicesNum = 0
|
||||
AutopilotSummaryInfo.infoTipNum = 0
|
||||
AutopilotSummaryInfo.vehicleTipNum = 0
|
||||
@@ -71,25 +71,25 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
val random = Random()
|
||||
//全息路口服务次数
|
||||
tvIntersectionServicesNum = findViewById(R.id.tvIntersectionServicesNum)
|
||||
tvIntersectionServicesNum?.text = AutopilotSummaryInfo.intersectionServicesNum.toString()
|
||||
tvIntersectionServicesNum?.text = CallerAutoPilotStatusListenerManager.getRoadCount().toString()
|
||||
//路口灯态服务次数
|
||||
tvLightServicesNum = findViewById(R.id.tvLightServicesNum)
|
||||
tvLightServicesNum?.text = AutopilotSummaryInfo.lightServicesNum.toString()
|
||||
//道路信息提醒次数
|
||||
tvInfoTipNum = findViewById(R.id.tvInfoTipNum)
|
||||
AutopilotSummaryInfo.infoTipNum += random.nextInt(3)
|
||||
AutopilotSummaryInfo.infoTipNum += random.nextInt(5) +1
|
||||
tvInfoTipNum?.text = AutopilotSummaryInfo.infoTipNum.toString()
|
||||
//车辆行为提醒次数
|
||||
tvVehicleTipNum = findViewById(R.id.tvVehicleTipNum)
|
||||
AutopilotSummaryInfo.vehicleTipNum += random.nextInt(3)
|
||||
AutopilotSummaryInfo.vehicleTipNum += random.nextInt(5) +1
|
||||
tvVehicleTipNum?.text = AutopilotSummaryInfo.vehicleTipNum.toString()
|
||||
//弱势参与者提醒次数
|
||||
tvVulnerableTipNum = findViewById(R.id.tvVulnerableTipNum)
|
||||
AutopilotSummaryInfo.vulnerableTipNum += random.nextInt(3)
|
||||
AutopilotSummaryInfo.vulnerableTipNum += random.nextInt(5)+1
|
||||
tvVulnerableTipNum?.text = AutopilotSummaryInfo.vulnerableTipNum.toString()
|
||||
//消除安全风险隐患次数
|
||||
tvDangerNum = findViewById(R.id.tvDangerNum)
|
||||
AutopilotSummaryInfo.dangerNum += random.nextInt(3)
|
||||
AutopilotSummaryInfo.dangerNum += random.nextInt(5)+1
|
||||
tvDangerNum?.text = AutopilotSummaryInfo.dangerNum.toString()
|
||||
//通行效率提升:本期为假数据,数据为百分数,值为7-14%之间的随机数,保留小数点后1位
|
||||
tvEfficiencyNum = findViewById(R.id.tvEfficiencyNum)
|
||||
@@ -98,7 +98,7 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
|
||||
tvEfficiencyNum?.text = num.toString()
|
||||
//小智总结
|
||||
tvSummaryZhiContent = findViewById(R.id.tvSummaryZhiContent)
|
||||
AutopilotSummaryInfo.vehicleServiceNum += AutopilotSummaryInfo.intersectionServicesNum+AutopilotSummaryInfo.lightServicesNum
|
||||
AutopilotSummaryInfo.vehicleServiceNum += CallerAutoPilotStatusListenerManager.getRoadCount()+AutopilotSummaryInfo.lightServicesNum
|
||||
+AutopilotSummaryInfo.infoTipNum + AutopilotSummaryInfo.vehicleTipNum + AutopilotSummaryInfo.vulnerableTipNum
|
||||
if(isDriver){
|
||||
tvSummaryZhiContent?.text = "全程 5km,智慧道路护航 3km,全息感知覆盖率 60%,车辆服务次数${AutopilotSummaryInfo.vehicleServiceNum}次"
|
||||
|
||||
@@ -122,12 +122,13 @@
|
||||
android:id="@+id/tvIntersectionServicesNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvIntersectionServices"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvIntersectionServices"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvIntersectionServicesUnit"
|
||||
android:textSize="@dimen/sp_94"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:fontFamily="@font/font_din"
|
||||
/>
|
||||
|
||||
@@ -135,13 +136,13 @@
|
||||
android:id="@+id/tvIntersectionServicesUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvIntersectionServicesNum"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvIntersectionServicesNum"
|
||||
app:layout_constraintRight_toRightOf="@id/tvIntersectionServices"
|
||||
android:textSize="@dimen/sp_31"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_91"
|
||||
android:text="@string/summary_service_unit"
|
||||
/>
|
||||
|
||||
@@ -150,12 +151,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvLightServices"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvLightServices"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvLightServicesUnit"
|
||||
android:textSize="@dimen/sp_94"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:fontFamily="@font/font_din"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -163,12 +165,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="@id/tvLightServices"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvLightServicesNum"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvLightServicesNum"
|
||||
android:textSize="@dimen/sp_31"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_91"
|
||||
android:text="@string/summary_service_unit"
|
||||
/>
|
||||
|
||||
@@ -177,12 +179,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvInfoTip"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvInfoTip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvInfoTipUnit"
|
||||
android:textSize="@dimen/sp_94"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:fontFamily="@font/font_din"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -190,12 +193,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvInfoTipNum"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInfoTipNum"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/tvInfoTip"
|
||||
android:textSize="@dimen/sp_31"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_91"
|
||||
android:text="@string/summary_service_unit"
|
||||
/>
|
||||
|
||||
@@ -203,20 +206,21 @@
|
||||
android:id="@+id/tvVehicleTipNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvVehicleTip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvVehicleTip"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvVehicleTipUnit"
|
||||
android:textSize="@dimen/sp_94"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:fontFamily="@font/font_din"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvVehicleTipUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvVehicleTipNum"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/tvVehicleTip"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvVehicleTipNum"
|
||||
android:textSize="@dimen/sp_31"
|
||||
@@ -224,6 +228,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:text="@string/summary_service_unit"
|
||||
android:layout_marginTop="@dimen/dp_91"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -231,19 +236,20 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvVulnerableTip"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvVulnerableTip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvVulnerableTipUnit"
|
||||
android:textSize="@dimen/sp_94"
|
||||
android:textColor="@color/summary_service_num_p"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:fontFamily="@font/font_din"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvVulnerableTipUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvVulnerableTipNum"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvVulnerableTipNum"
|
||||
app:layout_constraintRight_toRightOf="@id/tvVulnerableTip"
|
||||
android:textSize="@dimen/sp_31"
|
||||
@@ -251,6 +257,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:text="@string/summary_service_unit"
|
||||
android:layout_marginTop="@dimen/dp_91"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -274,8 +281,7 @@
|
||||
android:textSize="@dimen/sp_39"
|
||||
android:textColor="@color/summary_danger_title"
|
||||
android:text="@string/summary_danger_title"
|
||||
|
||||
android:layout_marginTop="@dimen/dp_58"
|
||||
android:layout_marginTop="@dimen/dp_53"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -288,7 +294,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:textColor="@color/summary_danger_num_p"
|
||||
android:textSize="@dimen/sp_195"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:layout_marginTop="@dimen/dp_88"
|
||||
android:fontFamily="@font/font_din"
|
||||
/>
|
||||
|
||||
@@ -296,11 +302,11 @@
|
||||
android:id="@+id/tvDangerUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvDangerNum"
|
||||
app:layout_constraintTop_toTopOf="@id/viewDangerLayout"
|
||||
app:layout_constraintRight_toRightOf="@id/viewDangerLayout"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvDangerNum"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_70"
|
||||
android:layout_marginTop="@dimen/dp_243"
|
||||
android:textColor="@color/summary_danger_num_p"
|
||||
android:textSize="@dimen/sp_52"
|
||||
android:text="@string/summary_service_unit"
|
||||
@@ -325,7 +331,7 @@
|
||||
android:text="@string/summary_efficiency_title"
|
||||
android:textSize="@dimen/sp_39"
|
||||
android:textColor="@color/summary_danger_title"
|
||||
android:layout_marginTop="@dimen/dp_58"
|
||||
android:layout_marginTop="@dimen/dp_53"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -338,7 +344,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:textColor="@color/summary_danger_num_p"
|
||||
android:textSize="@dimen/sp_195"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:layout_marginTop="@dimen/dp_88"
|
||||
android:fontFamily="@font/font_din"
|
||||
/>
|
||||
|
||||
@@ -346,11 +352,11 @@
|
||||
android:id="@+id/tvEfficiencyUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvEfficiencyNum"
|
||||
app:layout_constraintTop_toTopOf="@id/viewEfficiencyLayout"
|
||||
app:layout_constraintRight_toRightOf="@id/viewEfficiencyLayout"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvEfficiencyNum"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginBottom="@dimen/dp_70"
|
||||
android:layout_marginTop="@dimen/dp_243"
|
||||
android:textSize="@dimen/sp_52"
|
||||
android:textColor="@color/summary_danger_num_p"
|
||||
android:text="@string/summary_efficiency_unit"
|
||||
|
||||
Reference in New Issue
Block a user