[6.2.6]
[taxi-p] [动画调整]
@@ -110,13 +110,6 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
startAutopilotClose.visibility = View.GONE
|
||||
}
|
||||
|
||||
fun startAnimation2StartAutopilit() {
|
||||
checkPhoneNumber.visibility = View.GONE
|
||||
startAutopilotView.visibility = View.VISIBLE
|
||||
startAutopilotClose.visibility = View.VISIBLE
|
||||
aniCheck2StartAutopilotView?.start()
|
||||
}
|
||||
|
||||
fun aniCheckAndStartAutopilot(show:Boolean,status:Int){
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
|
||||
@@ -49,6 +49,7 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
|
||||
private var taxiPStartAutopilot: FrameAnimatorContainer? = null
|
||||
private var taxiPStartAutopilotCar: FrameAnimatorContainer? = null
|
||||
private lateinit var viewModel: StartAutopilotViewModel
|
||||
|
||||
|
||||
init {
|
||||
@@ -132,9 +133,11 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(isVisible){
|
||||
taxi_p_start_autopilot.background = null
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_p_enable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
viewModel.setOrderInfo()
|
||||
}else{
|
||||
unableStartAutopilot()
|
||||
goneAllDoorState()
|
||||
@@ -155,13 +158,12 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
aciv_middle_car.visibility = View.VISIBLE
|
||||
taxi_p_autopilot_btn_bg.visibility = View.VISIBLE
|
||||
taxi_p_start_autopilot.visibility = View.VISIBLE
|
||||
taxiPStartAutopilot?.reStart()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "onAttachedToWindow")
|
||||
val viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
viewModel.setStartAutopilotCallback(this)
|
||||
taxi_p_start_autopilot.onClick {
|
||||
//开启动画和自动驾驶
|
||||
@@ -176,10 +178,10 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
private fun unableStartAutopilot() {
|
||||
taxiPStartAutopilot?.stop()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00003)
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
taxi_p_autopilot_btn_bg.setImageResource(R.drawable.image_00000_0)
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_p_start_autopilot_txt_btn_bg)
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_p_unable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
@@ -187,10 +189,11 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
* ②:可以启动自驾
|
||||
*/
|
||||
private fun ableStartAutopilot() {
|
||||
taxiPStartAutopilot?.reStart()
|
||||
taxiPStartAutopilot?.stop()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00003)
|
||||
taxi_p_start_autopilot.background = null
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_p_enable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class StartAutopilotViewModel : ViewModel(),
|
||||
setOrderInfo()
|
||||
}
|
||||
|
||||
private fun setOrderInfo() {
|
||||
fun setOrderInfo() {
|
||||
val currentOCHOrder = TaxiPassengerModel.currentOCHOrder
|
||||
currentOCHOrder?.let {
|
||||
val phone = it.passengerPhone
|
||||
@@ -82,6 +82,7 @@ class StartAutopilotViewModel : ViewModel(),
|
||||
return
|
||||
}
|
||||
if (AutopilotManager.startAutopilot().isEmpty()) {
|
||||
RxUtils.disposeSubscribe(startCountDown)
|
||||
startCountDown = RxUtils.createSubscribe(TIMER_START_AUTOPILOT_INTERVAL) {
|
||||
viewCallback?.startAutopilotingTimeout()
|
||||
//未启动成功20s后做处理
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="76dp"/>
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:startColor="@color/taxi_p_58C9FF"
|
||||
android:endColor="@color/taxi_p_477CFC" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="76dp"/>
|
||||
<solid android:color="@color/taxi_p_A0B3DA"/>
|
||||
<!-- <gradient-->
|
||||
<!-- android:angle="180"-->
|
||||
<!-- android:type="linear"-->
|
||||
<!-- android:startColor="#E639699F"-->
|
||||
<!-- android:endColor="#395EC5" />-->
|
||||
|
||||
</shape>
|
||||
@@ -44,7 +44,7 @@
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="@dimen/dp_1200"
|
||||
android:textSize="@dimen/dp_88"
|
||||
android:textSize="@dimen/dp_68"
|
||||
android:textStyle="bold"
|
||||
tools:text="环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/cl_car_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/taxi_p_start_panel__df_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_p_autopilot_starting"
|
||||
android:layout_width="@dimen/dp_1600"
|
||||
android:layout_height="1200dp"
|
||||
android:layout_marginTop="@dimen/dp_150"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/starting_autopilot_view_close"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@drawable/taxi_p_passenger_arrived_close"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_p_autopilot_btn_bg"
|
||||
android:layout_width="1000dp"
|
||||
android:layout_height="500dp"
|
||||
android:clickable="false"
|
||||
android:src="@drawable/image_00000_0"
|
||||
android:layout_marginBottom="@dimen/dp_62"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/taxi_p_start_autopilot"
|
||||
android:layout_width="@dimen/dp_520"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="@dimen/dp_175"
|
||||
android:text="@string/taxi_p_start_autopilot_txt"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_52"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:background="@drawable/taxi_p_start_autopilot_txt_btn_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintRight_toRightOf="@+id/taxi_p_autopilot_btn_bg" />
|
||||
|
||||
|
||||
<View
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@drawable/taxi_p_start_autopilot_bottom_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_250"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_orderinfo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_59"
|
||||
tools:text="用户:1234882382 目的地:环球贸易中心"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_44"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_xiaozhi_belt_info_bg"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_xiaozhi_belt"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_xiaozhibelt_info"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_600"
|
||||
android:layout_height="@dimen/dp_339"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintStart_toStartOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
android:layout_marginTop="@dimen/dp_52"
|
||||
android:text="一切准备就绪,再开启行程吧!"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_xiaozhi_belt_ball_01"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
android:layout_marginTop="@dimen/dp_165"
|
||||
android:layout_marginStart="@dimen/dp_81"
|
||||
android:background="@drawable/taxi_p_xiaozhibelt_info_ball"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toTopOf="@+id/v_xiaozhi_belt_ball_01"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_xiaozhi_belt_ball_01"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_xiaozhi_belt_ball_01"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="关闭车门"
|
||||
android:textColor="@color/taxi_p_80F8FF"
|
||||
android:textSize="@dimen/dp_44"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_xiaozhi_belt_ball_02"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_xiaozhi_belt_info_bg"
|
||||
android:layout_marginTop="@dimen/dp_243"
|
||||
android:layout_marginStart="@dimen/dp_81"
|
||||
android:background="@drawable/taxi_p_xiaozhibelt_info_ball"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toTopOf="@+id/v_xiaozhi_belt_ball_02"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_xiaozhi_belt_ball_02"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_xiaozhi_belt_ball_01"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="佩戴安全带"
|
||||
android:textColor="@color/taxi_p_80F8FF"
|
||||
android:textSize="@dimen/dp_44"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_xiaozhi_belt"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@drawable/xiaozhi_belt_000"
|
||||
android:layout_width="@dimen/dp_360"
|
||||
android:layout_height="@dimen/dp_360"
|
||||
android:layout_marginBottom="@dimen/dp_m_30"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_vertical_center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_horizontal_center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_front_right_door"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintStart_toStartOf="@+id/gl_vertical_center"
|
||||
android:layout_marginStart="@dimen/dp_106"
|
||||
android:text="右前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_front_right_door_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_front_left_door"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gl_horizontal_center"
|
||||
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_center"
|
||||
android:layout_marginEnd="@dimen/dp_106"
|
||||
android:text="左前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_front_left_door_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_rear_left_door"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_center"
|
||||
android:layout_marginEnd="@dimen/dp_135"
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="左后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_rear_left_door_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_rear_right_door"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@+id/gl_vertical_center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_center"
|
||||
android:layout_marginStart="@dimen/dp_135"
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="右后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_rear_right_door_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_p_autopilot_starting"
|
||||
android:layout_width="@dimen/dp_900"
|
||||
android:layout_height="@dimen/dp_408"
|
||||
android:layout_width="@dimen/dp_1125"
|
||||
android:layout_height="@dimen/dp_510"
|
||||
android:layout_marginTop="@dimen/dp_610"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/light_00018"
|
||||
@@ -64,7 +64,7 @@
|
||||
android:textSize="@dimen/dp_52"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:background="@drawable/taxi_p_start_autopilot_txt_btn_bg"
|
||||
android:background="@drawable/taxi_p_enable_start_autopilot"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintRight_toRightOf="@+id/taxi_p_autopilot_btn_bg" />
|
||||
@@ -107,8 +107,8 @@
|
||||
android:layout_marginStart="@dimen/dp_106"
|
||||
android:text="右前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_front_right_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_p_front_right_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
android:layout_marginEnd="@dimen/dp_106"
|
||||
android:text="左前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_front_left_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_p_front_left_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -140,8 +140,8 @@
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="左后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_rear_left_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_p_rear_left_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="右后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxi_p_rear_right_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_p_rear_right_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<color name="taxi_p_76D7FF">#76D7FF</color>
|
||||
<color name="taxi_p_255BAA">#255BAA</color>
|
||||
<color name="taxi_p_80F8FF">#80F8FF</color>
|
||||
<color name="taxi_p_2B364B">#2B364B</color>
|
||||
<color name="taxi_p_A0B3DA">#A0B3DA</color>
|
||||
<color name="taxi_p_005D6A8C">#005D6A8C</color>
|
||||
<color name="taxi_p_5D6A8C">#5D6A8C</color>
|
||||
<color name="taxi_p_995D6A8C">#995D6A8C</color>
|
||||
@@ -45,6 +45,8 @@
|
||||
|
||||
<color name="taxi_p_464646">#464646</color>
|
||||
<color name="taxi_p_191E3C">#191E3C</color>
|
||||
<color name="taxi_p_58C9FF">#58C9FF</color>
|
||||
<color name="taxi_p_477CFC">#477CFC</color>
|
||||
|
||||
<color name="taxi_p_378EFB">#378EFB</color>
|
||||
<color name="taxi_p_876E788B">#876E788B</color>
|
||||
|
||||
@@ -114,13 +114,6 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
startAutopilotClose.visibility = View.GONE
|
||||
}
|
||||
|
||||
fun startAnimation2StartAutopilit() {
|
||||
checkPhoneNumber.visibility = View.GONE
|
||||
startAutopilotView.visibility = View.VISIBLE
|
||||
startAutopilotClose.visibility = View.VISIBLE
|
||||
aniCheck2StartAutopilotView?.start()
|
||||
}
|
||||
|
||||
fun aniCheckAndStartAutopilot(show:Boolean,status:Int){
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
|
||||
@@ -49,6 +49,7 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
|
||||
private var taxiPStartAutopilot: FrameAnimatorContainer? = null
|
||||
private var taxiPStartAutopilotCar: FrameAnimatorContainer? = null
|
||||
private lateinit var viewModel: StartAutopilotViewModel
|
||||
|
||||
|
||||
init {
|
||||
@@ -132,9 +133,11 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(isVisible){
|
||||
taxi_p_start_autopilot.background = null
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_u_p_enable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
viewModel.setOrderInfo()
|
||||
}else{
|
||||
unableStartAutopilot()
|
||||
goneAllDoorState()
|
||||
@@ -155,13 +158,12 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
aciv_middle_car.visibility = View.VISIBLE
|
||||
taxi_p_autopilot_btn_bg.visibility = View.VISIBLE
|
||||
taxi_p_start_autopilot.visibility = View.VISIBLE
|
||||
taxiPStartAutopilot?.reStart()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "onAttachedToWindow")
|
||||
val viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
viewModel.setStartAutopilotCallback(this)
|
||||
taxi_p_start_autopilot.onClick {
|
||||
//开启动画和自动驾驶
|
||||
@@ -176,10 +178,10 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
private fun unableStartAutopilot() {
|
||||
taxiPStartAutopilot?.stop()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00003)
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
taxi_p_autopilot_btn_bg.setImageResource(R.drawable.image_00000_0)
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxt_u_p_start_autopilot_txt_btn_bg)
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_u_p_unable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
@@ -187,10 +189,11 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
* ②:可以启动自驾
|
||||
*/
|
||||
private fun ableStartAutopilot() {
|
||||
taxiPStartAutopilot?.reStart()
|
||||
taxiPStartAutopilot?.stop()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00003)
|
||||
taxi_p_start_autopilot.background = null
|
||||
taxi_p_autopilot_starting.setImageResource(R.drawable.light_00018)
|
||||
taxi_p_start_autopilot.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.taxi_u_p_enable_start_autopilot)
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
@@ -203,7 +206,7 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxi_p_start_autopilot.background = null
|
||||
taxi_p_start_autopilot?.text = resources.getString(R.string.taxi_p_start_autopilot_loading)
|
||||
taxi_p_start_autopilot?.setTextColor(
|
||||
ContextCompat.getColor(context, R.color.taxi_p_start_autopilot_txt_color)
|
||||
ContextCompat.getColor(context, android.R.color.white)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class StartAutopilotViewModel : ViewModel(),
|
||||
setOrderInfo()
|
||||
}
|
||||
|
||||
private fun setOrderInfo() {
|
||||
fun setOrderInfo() {
|
||||
val currentOCHOrder = TaxiPassengerModel.currentOCHOrder
|
||||
currentOCHOrder?.let {
|
||||
val phone = it.bookingUserPhone
|
||||
@@ -82,6 +82,7 @@ class StartAutopilotViewModel : ViewModel(),
|
||||
return
|
||||
}
|
||||
if (AutopilotManager.startAutopilot().isEmpty()) {
|
||||
RxUtils.disposeSubscribe(startCountDown)
|
||||
startCountDown = RxUtils.createSubscribe(TIMER_START_AUTOPILOT_INTERVAL) {
|
||||
viewCallback?.startAutopilotingTimeout()
|
||||
//未启动成功20s后做处理
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="76dp"/>
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:startColor="@color/taxi_p_58C9FF"
|
||||
android:endColor="@color/taxi_p_477CFC" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="76dp"/>
|
||||
<solid android:color="@color/taxi_p_A0B3DA"/>
|
||||
<!-- <gradient-->
|
||||
<!-- android:angle="180"-->
|
||||
<!-- android:type="linear"-->
|
||||
<!-- android:startColor="#E639699F"-->
|
||||
<!-- android:endColor="#395EC5" />-->
|
||||
|
||||
</shape>
|
||||
@@ -44,7 +44,7 @@
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="@dimen/dp_1200"
|
||||
android:textSize="@dimen/dp_88"
|
||||
android:textSize="@dimen/dp_68"
|
||||
android:textStyle="bold"
|
||||
tools:text="环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_p_autopilot_starting"
|
||||
android:layout_width="@dimen/dp_900"
|
||||
android:layout_height="@dimen/dp_408"
|
||||
android:layout_width="@dimen/dp_1125"
|
||||
android:layout_height="@dimen/dp_510"
|
||||
android:layout_marginTop="@dimen/dp_610"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/light_00018"
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_middle_car"
|
||||
android:src="@drawable/taxi_p_startautopilt_car_top"
|
||||
android:src="@drawable/taxi_u_p_startautopilt_car_top"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_width="@dimen/dp_301"
|
||||
@@ -64,7 +64,7 @@
|
||||
android:textSize="@dimen/dp_52"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:background="@drawable/taxt_u_p_start_autopilot_txt_btn_bg"
|
||||
android:background="@drawable/taxi_u_p_enable_start_autopilot"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/taxi_p_autopilot_btn_bg"
|
||||
app:layout_constraintRight_toRightOf="@+id/taxi_p_autopilot_btn_bg" />
|
||||
@@ -107,8 +107,8 @@
|
||||
android:layout_marginStart="@dimen/dp_106"
|
||||
android:text="右前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxt_u_p_front_right_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_u_p_front_right_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
android:layout_marginEnd="@dimen/dp_106"
|
||||
android:text="左前车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxt_u_p_front_left_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_u_p_front_left_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -140,8 +140,8 @@
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="左后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxt_u_p_rear_left_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_u_p_rear_left_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
android:layout_marginTop="@dimen/dp_142"
|
||||
android:text="右后车门未关"
|
||||
android:textSize="@dimen/dp_35"
|
||||
android:textColor="@color/taxi_p_2B364B"
|
||||
android:background="@drawable/taxt_u_p_rear_right_door_bg"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/taxi_u_p_rear_right_door"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
<color name="taxi_p_876E788B">#876E788B</color>
|
||||
|
||||
|
||||
|
||||
<color name="taxi_p_58C9FF">#58C9FF</color>
|
||||
<color name="taxi_p_477CFC">#477CFC</color>
|
||||
<color name="taxi_p_A0B3DA">#A0B3DA</color>
|
||||
|
||||
</resources>
|
||||
@@ -1024,6 +1024,7 @@
|
||||
<dimen name="dp_999">999dp</dimen>
|
||||
<dimen name="dp_1000">1000dp</dimen>
|
||||
<dimen name="dp_1100">1100dp</dimen>
|
||||
<dimen name="dp_1125">1125dp</dimen>
|
||||
<dimen name="dp_1200">1200dp</dimen>
|
||||
<dimen name="dp_1300">1300dp</dimen>
|
||||
<dimen name="dp_1600">1600dp</dimen>
|
||||
|
||||