[8.0.0]
[fea] [路程信息]
This commit is contained in:
@@ -293,7 +293,7 @@ object DebugDataDispatch {
|
||||
newBuilder.heading = list.msg.GnssInfo.heading
|
||||
newBuilder.gnssSpeed = list.msg.GnssInfo.gnssSpeed
|
||||
CallerChassisGnssListenerManager.invokeChassisGnssListener(newBuilder.build())
|
||||
Thread.sleep(100)
|
||||
Thread.sleep(50)
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
|
||||
@@ -40,8 +40,8 @@ class ExampleUnitTest {
|
||||
|
||||
@Test
|
||||
fun resetDataOnlyOne(){
|
||||
val wgS84ToGCJ021 = CoordinateTransform.WGS84ToGCJ02(112.57734109982152,26.819824546720504)
|
||||
val wgS84ToGCJ022 = CoordinateTransform.WGS84ToGCJ02(112.57299,26.90656)
|
||||
val wgS84ToGCJ021 = CoordinateTransform.WGS84ToGCJ02(121.16223587817339,31.282241760977307)
|
||||
val wgS84ToGCJ022 = CoordinateTransform.WGS84ToGCJ02(121.17099138155325,31.28418305918798)
|
||||
println("${wgS84ToGCJ021[1]},${wgS84ToGCJ021[0]}----1")
|
||||
println("${wgS84ToGCJ022[1]},${wgS84ToGCJ022[0]}----2")
|
||||
}
|
||||
|
||||
@@ -14,11 +14,8 @@ import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.unmanned.taxi.passenger.R
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_arrived_time
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_distance
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_distance_unit
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_endstation
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_surplus_time
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_surplus_time_unit
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.actv_surplus
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_itinerary.view.progress_distance
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
@@ -44,10 +41,26 @@ class ItineraryView : ConstraintLayout, OrderInfoViewModel.ItineraryViewCallback
|
||||
}
|
||||
|
||||
private fun setDrawable(normal:Boolean) {
|
||||
|
||||
val corner = AutoSizeUtils.dp2px(context, 20f).toFloat()
|
||||
val cornerTop = AutoSizeUtils.dp2px(context, 20f).toFloat()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
val bottomColorEnd = ContextCompat.getColor(context, R.color.taxi_cp_80D4E4F0)
|
||||
val bottomColorStart = ContextCompat.getColor(context, R.color.taxi_cp_A3C9EA)
|
||||
|
||||
val temp01 = GradientDrawable()
|
||||
temp01.cornerRadii = floatArrayOf(0f, 0f, 0f, 0f, corner, corner, corner, corner)
|
||||
temp01.colors = intArrayOf(bottomColorStart, bottomColorEnd)
|
||||
temp01.orientation = GradientDrawable.Orientation.LEFT_RIGHT
|
||||
|
||||
|
||||
val gradientDrawable = GradientDrawable()
|
||||
gradientDrawable.shape = GradientDrawable.RECTANGLE
|
||||
val corner = AutoSizeUtils.dp2px(context, 40f).toFloat()
|
||||
val cornerTop = AutoSizeUtils.dp2px(context, 20f).toFloat()
|
||||
if(normal) {
|
||||
gradientDrawable.cornerRadii =
|
||||
floatArrayOf(0f, 0f, cornerTop, cornerTop, cornerTop, cornerTop, corner, corner)
|
||||
@@ -55,20 +68,19 @@ class ItineraryView : ConstraintLayout, OrderInfoViewModel.ItineraryViewCallback
|
||||
gradientDrawable.cornerRadii =
|
||||
floatArrayOf(0f, 0f, 0f, 0f, corner, corner, corner, corner)
|
||||
}
|
||||
|
||||
val firstColor = ContextCompat.getColor(context, R.color.taxi_p_0F5FFF)
|
||||
val setondColor = ContextCompat.getColor(context, R.color.taxi_p_44C8FF)
|
||||
val thirdColor = ContextCompat.getColor(context, R.color.taxi_p_8AE4ED)
|
||||
val fourceColor = ContextCompat.getColor(context, R.color.taxi_p_C8F3F4)
|
||||
val bottomColor = ContextCompat.getColor(context, android.R.color.transparent)
|
||||
|
||||
gradientDrawable.colors = intArrayOf(firstColor, setondColor, thirdColor, fourceColor)
|
||||
gradientDrawable.orientation = GradientDrawable.Orientation.LEFT_RIGHT
|
||||
|
||||
val temp01 = GradientDrawable()
|
||||
temp01.cornerRadii = floatArrayOf(0f, 0f, 0f, 0f, corner, corner, corner, corner)
|
||||
temp01.colors = intArrayOf(bottomColor, bottomColor)
|
||||
|
||||
val scaleDrawable3 = ScaleDrawable(gradientDrawable, Gravity.START, 1f, -1f)
|
||||
|
||||
|
||||
val arr = arrayOf(temp01, scaleDrawable3)
|
||||
|
||||
val ld = LayerDrawable(arr)
|
||||
ld.setDrawableByLayerId(android.R.id.background, temp01)
|
||||
ld.setDrawableByLayerId(android.R.id.progress, scaleDrawable3)
|
||||
@@ -101,12 +113,10 @@ class ItineraryView : ConstraintLayout, OrderInfoViewModel.ItineraryViewCallback
|
||||
surplusTime:String,surplusTimeUnit:String,
|
||||
arrivedTime:String,alreadyGone:Int,stationDistance:Int
|
||||
){
|
||||
actv_distance.text = surplusdistance
|
||||
actv_distance_unit.text = distanceUnit
|
||||
actv_surplus_time .text= surplusTime
|
||||
actv_surplus_time_unit.text = surplusTimeUnit
|
||||
actv_arrived_time.text= arrivedTime
|
||||
|
||||
actv_surplus.text = "剩余${surplusdistance}${distanceUnit},${surplusTime}${surplusTimeUnit}"
|
||||
|
||||
if(stationDistance>0&&alreadyGone<stationDistance){
|
||||
|
||||
if (progress_distance.max != stationDistance) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,8 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:centerColor="@color/taxi_cp_9EB0D3"
|
||||
android:endColor="@color/taxi_cp_009EB0D3"
|
||||
android:startColor="@color/taxi_cp_009EB0D3" />
|
||||
|
||||
</shape>
|
||||
@@ -172,8 +172,8 @@
|
||||
<!-- 路程信息 -->
|
||||
<com.mogo.och.unmanned.passenger.ui.orderinfo.ItineraryView
|
||||
android:id="@+id/itinerary"
|
||||
android:layout_width="@dimen/dp_866"
|
||||
android:layout_height="@dimen/dp_467"
|
||||
android:layout_width="@dimen/dp_822"
|
||||
android:layout_height="@dimen/dp_246"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="-28dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom"
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_866"
|
||||
android:layout_height="@dimen/dp_467"
|
||||
android:layout_width="@dimen/dp_822"
|
||||
android:layout_height="@dimen/dp_246"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_bottom_bg"
|
||||
android:layout_width="@dimen/dp_866"
|
||||
android:layout_height="@dimen/dp_467"
|
||||
android:layout_width="@dimen/dp_822"
|
||||
android:layout_height="@dimen/dp_246"
|
||||
android:background="@drawable/taxt_u_p_itinerary_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_horizontal_top"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_50"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_28"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_93"
|
||||
android:layout_marginStart="@dimen/dp_71"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:textColor="@color/taxi_p_004DC4"
|
||||
android:textSize="@dimen/dp_38"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_top"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
android:text="前往" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -49,10 +49,9 @@
|
||||
android:maxLength="25"
|
||||
android:maxLines="1"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:textColor="@color/taxi_p_293449"
|
||||
android:textColor="@color/taxi_p_081831"
|
||||
android:textSize="@dimen/dp_38"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_top"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/actv_endstation_title"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_arrived_time_unit"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_endstation_title"
|
||||
android:text="--" />
|
||||
@@ -66,132 +65,49 @@
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_arrived_time"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_top"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/actv_endstation_title"
|
||||
android:text="到达" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_arrived_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:textColor="@color/taxi_p_203555"
|
||||
android:textSize="@dimen/dp_38"
|
||||
tools:textColor="@color/taxi_p_081831"
|
||||
android:textSize="@dimen/dp_44"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_97"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_top"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
android:layout_marginEnd="@dimen/dp_75"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/actv_arrived_time_unit"
|
||||
tools:text="15:05" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distance"
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_80"
|
||||
android:layout_marginBottom="@dimen/dp_66"
|
||||
android:layout_marginStart="@dimen/dp_58"
|
||||
android:textSize="@dimen/dp_61"
|
||||
android:fontFamily="@font/taxt_u_p_din"
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
android:textColor="@color/taxi_p_081831"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_surplus_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_bottom_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_bottom_bg"
|
||||
android:text="--" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distance_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/taxi_p_112B57"
|
||||
android:textSize="@dimen/dp_33"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_distance"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_distance"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_distance"
|
||||
android:text="剩余(分)" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_61"
|
||||
android:fontFamily="@font/taxt_u_p_din"
|
||||
android:textColor="@color/taxi_p_081831"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ll_simplemap_contain"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_distance"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_distance"
|
||||
android:text="--" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus_time_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/taxi_p_112B57"
|
||||
android:textSize="@dimen/dp_33"
|
||||
android:text="距离(KM)"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_surplus_time"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_surplus_time"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_surplus_time" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ll_simplemap_contain"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_58"
|
||||
app:layout_constraintBottom_toTopOf="@+id/progress_distance"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_surplus_time"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_center">
|
||||
|
||||
<com.mogo.och.unmanned.passenger.ui.simplemap.SimpleMapView
|
||||
android:id="@+id/simpleMap"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_north"
|
||||
android:text="N"
|
||||
android:textColor="@color/taxi_p_6C8BB9"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_97"
|
||||
android:layout_marginBottom="@dimen/dp_115"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:src="@drawable/taxi_p_north"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_north"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_north"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_north"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_11"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_distance"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_66"
|
||||
android:layout_marginStart="@dimen/dp_58"
|
||||
android:layout_marginEnd="@dimen/dp_58"
|
||||
android:layout_marginBottom="@dimen/dp_44"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:progress="20"
|
||||
android:maxHeight="@dimen/dp_10"
|
||||
android:minHeight="@dimen/dp_10"
|
||||
android:background="@null" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus"
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_71"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:fontFamily="@font/taxt_u_p_din"
|
||||
android:textColor="@color/color_white"
|
||||
tools:textColor="@color/result_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/progress_distance"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progress_distance"
|
||||
tools:text="剩余23.2公里,12分钟" />
|
||||
|
||||
|
||||
</merge>
|
||||
@@ -87,7 +87,10 @@
|
||||
<color name="taxi_cp_41444D">#41444D</color>
|
||||
|
||||
<color name="taxi_cp_9EB0D3">#9EB0D3</color>
|
||||
<color name="taxi_cp_009EB0D3">#009EB0D3</color>
|
||||
|
||||
<color name="taxi_cp_80D4E4F0">#80D4E4F0</color>
|
||||
|
||||
<color name="taxi_cp_A3C9EA">#A3C9EA</color>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
<string name="taxi_p_start_autopilot_fail_10s_tip">自动驾驶启动失败,请与司机确认车辆状态</string>
|
||||
<string name="taxi_p_start_autopilot_un_click_tip">车辆尚未完成准备,不能启动自动驾驶</string>
|
||||
|
||||
<string name="taxi_p_distance_unit_km">距离(KM)</string>
|
||||
<string name="taxi_p_distance_unit_m">距离(M)</string>
|
||||
<string name="taxi_p_surplustime">剩余(分)</string>
|
||||
<string name="taxi_p_distance_unit_km">公里</string>
|
||||
<string name="taxi_p_distance_unit_m">米</string>
|
||||
<string name="taxi_p_surplustime">分钟</string>
|
||||
|
||||
|
||||
<string name="taxi_p_setting_light">亮度</string>
|
||||
|
||||
Reference in New Issue
Block a user