diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 348ca2acbe..3edd01769f 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -1358,6 +1358,9 @@ public class TaxiModel { //开启实时计算剩余距离,剩余时间,预计时间 startOrStopCalculateRouteInfo(true); AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi(); + if (mOrderStatusCallback != null){ + mOrderStatusCallback.onNaviToEnd(false,false); + } } private void reportTotalDisAndTime() { diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java index d94c06c813..056ed4c921 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java @@ -315,8 +315,10 @@ public class TaxiFragment extends BaseTaxiTabFragment(), } override fun initViews() { + toggleStatusBarView() + initViewShowWithConfig() //设置StatusBar初始状态 @@ -742,6 +744,52 @@ class MoGoHmiFragment : MvpFragment(), } } + private fun toggleStatusBarView() { + activity?.let{ + if(statusBarViewFloat!= null){ + WarningFloat.dismiss(statusBarViewFloat!!.config.floatTag, false) + statusBarViewFloat = null + statusBarView = null + }else{ + if (statusBarView == null){ + statusBarView = StatusBarView(it) + } + val side = TOP + val gravity = Gravity.TOP + statusBarViewFloat = WarningFloat.with(it) + .setTag("statusBarView") + .setLayout(statusBarView!!) + .setSidePattern(side) + .setWindowWidth(ScreenUtils.getScreenWidth()) + .setWindowHeight(BarUtils.getStatusBarHeight()) + .setGravity(gravity, 0) + .setImmersionStatusBar(true) + .setAnimator(object : DefaultAnimator() { + override fun enterAnim( + view: View, + params: LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.enterAnim(view, params, windowManager, sidePattern) + ?.apply { + interpolator = LinearInterpolator() + } + + override fun exitAnim( + view: View, + params: LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.exitAnim(view, params, windowManager, sidePattern) + ?.setDuration(200) + }) + .show() + } + } + } + /** * 展示VR下V2X预警 * diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index c6c1ce249a..562f8806d9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -7,6 +7,7 @@ import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.os.Process import android.util.AttributeSet +import android.util.Log import android.view.LayoutInflater import android.view.View import android.widget.FrameLayout @@ -113,51 +114,45 @@ class AutoPilotAndCheckView @JvmOverloads constructor( // if (maxAcceleration > 0) { // tvAcceleration.text = "加速度 $maxAcceleration m/s²" // } - tvAcceleration.text = "每次调整车速±5km/h" + tvAcceleration.text = "每次调整车速±5km/h,点击确定生效" if (speedLimit > 0) { tvSpeed.text = speedLimit.toString() }else{ tvSpeed.text = "0" } + ivSpeedReduce.setOnClickListener { if(speedLimit>=5){ speedLimit -= 5 - //速度显示 - val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit) - when { - isSuccess -> { - //速度显示 - tvSpeed.text = speedLimit.toString() - ToastUtils.showShort("车速设置成功,立即生效") - } - else -> { - ToastUtils.showShort("设置车速失败,请启动域控制器") - } - } + tvSpeed.text = speedLimit.toString() }else{ ToastUtils.showShort("车速不能再减了") } } + ivSpeedAdd.setOnClickListener { if(speedLimit<=55){ speedLimit += 5 - //速度显示 - val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit) - when { - isSuccess -> { - //速度显示 - tvSpeed.text = speedLimit.toString() - ToastUtils.showShort("车速设置成功,立即生效") - } - else -> { - ToastUtils.showShort("设置车速失败,请启动域控制器") - } - } + tvSpeed.text = speedLimit.toString() }else{ ToastUtils.showShort("车速不能再加了") } } + //速度确认 + tvSureModify.setOnClickListener { + val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit) + when { + isSuccess -> { + //速度显示 + tvSpeed.text = speedLimit.toString() + ToastUtils.showShort("车速设置成功,立即生效") + } + else -> { + ToastUtils.showShort("设置车速失败,请启动域控制器") + } + } + } initOchView() } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/taxi_loginout_sure_bg.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/taxi_loginout_sure_bg.xml new file mode 100644 index 0000000000..d681263571 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/taxi_loginout_sure_bg.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml index a41f32557b..fcdc0ab192 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml @@ -241,6 +241,7 @@ /> x` + android:layout_marginStart="40px" /> + +