[6.5.0]行程总结调整地图
This commit is contained in:
@@ -8,6 +8,7 @@ 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 com.mogo.eagle.core.function.view.TravelRealityView
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.util.Random
|
||||
|
||||
@@ -30,6 +31,7 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
private var tvVulnerableTipNum: TextView ?= null //弱势参与者提醒次数
|
||||
private var tvDangerNum: TextView ?= null //消除安全风险隐患次数
|
||||
private var tvEfficiencyNum: TextView ?= null //通行效率提升
|
||||
private var travelRealityView: TravelRealityView ?= null
|
||||
private val random = Random()
|
||||
private var mileage: Float = 1000f //总里程
|
||||
|
||||
@@ -56,6 +58,9 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
}
|
||||
|
||||
private fun initEvent(){
|
||||
//地图
|
||||
travelRealityView = findViewById(R.id.travelRealityView)
|
||||
travelRealityView?.onCreateView(null)
|
||||
//关闭Dialog按钮
|
||||
ivSummaryClose = findViewById(R.id.ivSummaryClose)
|
||||
ivSummaryClose?.setOnClickListener {
|
||||
@@ -112,4 +117,15 @@ open class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: In
|
||||
this.mileage = mileage
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
travelRealityView?.onResume()
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
travelRealityView?.onPause()
|
||||
travelRealityView?.onDestroy()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,25 +5,36 @@
|
||||
android:background="@drawable/bg_itinerary_summary"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.mogo.eagle.core.function.view.TravelRealityView
|
||||
android:id="@+id/travelRealityView"
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="@dimen/dp_618"
|
||||
android:layout_height="@dimen/dp_988"
|
||||
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:topPadding="52"
|
||||
app:leftPadding="52"
|
||||
app:bottomPadding="52"
|
||||
app:rightPadding="52"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxt_u_p_map_view_dir_end"
|
||||
app:mapStyleExtraPath="over_view_style_extra.data"
|
||||
app:mapStylePath="over_view_style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_91"
|
||||
app:roundLayoutRadius="@dimen/dp_30">
|
||||
|
||||
<com.mogo.eagle.core.function.view.TravelRealityView
|
||||
android:id="@+id/travelRealityView"
|
||||
android:layout_width="@dimen/dp_618"
|
||||
android:layout_height="@dimen/dp_988"
|
||||
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:topPadding="52"
|
||||
app:leftPadding="52"
|
||||
app:bottomPadding="52"
|
||||
app:rightPadding="52"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxt_u_p_map_view_dir_end"
|
||||
app:mapStyleExtraPath="over_view_style_extra.data"
|
||||
app:mapStylePath="over_view_style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryClose"
|
||||
|
||||
@@ -5,25 +5,37 @@
|
||||
android:background="@drawable/bg_itinerary_summary_p"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.mogo.eagle.core.function.view.TravelRealityView
|
||||
android:id="@+id/travelRealityView"
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="@dimen/dp_618"
|
||||
android:layout_height="@dimen/dp_988"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
|
||||
app:bottomPadding="52"
|
||||
app:leftPadding="52"
|
||||
app:rightPadding="52"
|
||||
app:topPadding="52"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxt_u_p_map_view_dir_end"
|
||||
app:mapStyleExtraPath="style_extra.data"
|
||||
app:mapStylePath="style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_91"
|
||||
app:roundLayoutRadius="@dimen/dp_30"
|
||||
>
|
||||
|
||||
<com.mogo.eagle.core.function.view.TravelRealityView
|
||||
android:id="@+id/travelRealityView"
|
||||
android:layout_width="@dimen/dp_618"
|
||||
android:layout_height="@dimen/dp_988"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
|
||||
app:bottomPadding="52"
|
||||
app:leftPadding="52"
|
||||
app:rightPadding="52"
|
||||
app:topPadding="52"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxt_u_p_map_view_dir_end"
|
||||
app:mapStyleExtraPath="style_extra.data"
|
||||
app:mapStylePath="style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryClose"
|
||||
|
||||
Reference in New Issue
Block a user