[fea]
[自动启动自驾动画]
This commit is contained in:
yangyakun
2024-10-12 19:38:33 +08:00
parent 94a3a5852c
commit 73fb896ed9
2 changed files with 32 additions and 0 deletions

View File

@@ -28,10 +28,12 @@ import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum
import com.mogo.och.common.module.utils.FlowBus
import com.mogo.och.common.module.wigets.StartAutopilotAnimationView
import com.mogo.och.common.module.wigets.map.drawline.LineView
import com.mogo.och.unmanned.taxi.R
import com.mogo.och.unmanned.taxi.constant.TaxiDriverEventConst
import com.mogo.och.unmanned.taxi.constant.TaxiUnmannedConst
import com.mogo.och.unmanned.taxi.constant.TaxiUnmannedConst.Companion.START_AUTOPILOT_ANIMATION_INTERVAL
import com.mogo.och.unmanned.taxi.ui.navi.amap.TaxiAmapNaviFragment
import com.mogo.och.unmanned.taxi.ui.navi.auto.TaxiRoutingNaviFragment
import com.mogo.och.unmanned.taxi.ui.operational.TaxiOperationalDialogFragment
@@ -41,6 +43,7 @@ import com.mogo.och.unmanned.taxi.utils.TPRouteDataTestUtils
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.unmannedMapCL
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_mogo_och_navi_panel_container
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.orderDebugView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.startAutopilotAnimationView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.taxi_close_navi_icon
import java.lang.ref.WeakReference
@@ -193,6 +196,7 @@ class TaxiFragment :MvpFragment<TaxiFragment?, TaxiPresenter?>(),
it.removeAllLines()
it.removeAllPoints()
}
startAutopilotAnimationView.cancelCountdown()
super.onDestroyView()
}
@@ -351,7 +355,20 @@ class TaxiFragment :MvpFragment<TaxiFragment?, TaxiPresenter?>(),
}
fun showStartAutopilotBlinkAnimation() {
startAutopilotAnimationView.show(
StartAutopilotAnimationView.DirectionEnum.ALERT_WARNING_TOP,
START_AUTOPILOT_ANIMATION_INTERVAL,
object : StartAutopilotAnimationView.AnimationViewTimerListener{
override fun onTimerResume(remainingTime: Long) {
resumeStartAutopilot(remainingTime)
}
override fun onTimerPause() {
pauseStartAutopilot()
}
}
)
}
fun pauseStartAutopilot() {
@@ -367,12 +384,15 @@ class TaxiFragment :MvpFragment<TaxiFragment?, TaxiPresenter?>(),
}
private fun stopStartAutopilotBlinkAnimation() {
startAutopilotAnimationView.dismiss(StartAutopilotAnimationView.DirectionEnum.ALERT_WARNING_TOP)
}
fun pauseAutopilotBlinkAnimation() {
startAutopilotAnimationView.pause()
}
fun resumeAutopilotBlinkAnimation() {
startAutopilotAnimationView.resume()
}
fun setGuidShow() {

View File

@@ -83,5 +83,17 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@+id/unmannedMapCL"/>
<!--自动启动自驾闪烁上边框-->
<com.mogo.och.common.module.wigets.StartAutopilotAnimationView
android:id="@+id/startAutopilotAnimationView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_76"
android:elevation="100dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>