diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt index 75f6f3cbc4..ace1d003fa 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt @@ -31,6 +31,7 @@ import com.mogo.och.bus.passenger.callback.* import com.mogo.och.bus.passenger.constant.CharterPassengerConst import com.mogo.och.bus.passenger.net.BusPassengerModelLoopManager import com.mogo.och.bus.passenger.net.BusPassengerServiceManager +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.utils.VoiceFocusManager import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg @@ -373,7 +374,7 @@ object CharterPassengerModel { } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) } @@ -505,7 +506,7 @@ object CharterPassengerModel { } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) } @@ -609,7 +610,7 @@ object CharterPassengerModel { } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) } @@ -630,7 +631,7 @@ object CharterPassengerModel { } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) } @@ -678,7 +679,7 @@ object CharterPassengerModel { ) if(lastSumLength>100) { if (mRoutePoints.size == 0){ - ToastUtils.showLong("缺少轨迹数据") + ToastCharterUtils.showLong("缺少轨迹数据") return } // 计算距离 @@ -875,7 +876,7 @@ object CharterPassengerModel { } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") broadcastList[requestIngSign] = false } @@ -1001,7 +1002,7 @@ object CharterPassengerModel { */ fun startAutopilot() { if (!OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) { - ToastUtils.showLong( + ToastCharterUtils.showLong( OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason + ", 请稍候重试" ) @@ -1009,16 +1010,16 @@ object CharterPassengerModel { } orderInfo?.let { if(it.arriveStatus==OrderInfoResponse.ARRIVED){ - ToastUtils.showLong("已到达目的地请重新选择线路") + ToastCharterUtils.showLong("已到达目的地请重新选择线路") return } val parameters = initAutopilotControlParameters() if (null == parameters) { - ToastUtils.showShort("请选择站点") + ToastCharterUtils.showShort("请选择站点") CallerLogger.e(SceneConstant.M_BUS + TAG, "行程日志-AutopilotControlParameters is empty.") return } - ToastUtils.showShort("启动自动驾驶中") + ToastCharterUtils.showShort("启动自动驾驶中") startAutoPilot(parameters) CallerLogger.d( SceneConstant.M_BUS + TAG, diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/net/BusPassengerServiceManager.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/net/BusPassengerServiceManager.kt index b0480f4ab7..ace0ad5d86 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/net/BusPassengerServiceManager.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/net/BusPassengerServiceManager.kt @@ -4,10 +4,10 @@ import android.content.Context import com.mogo.eagle.core.data.BaseData import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.network.MoGoRetrofitFactory -import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.och.bus.passenger.bean.request.ArriveDestRequest import com.mogo.och.bus.passenger.bean.request.EndOrderRequest import com.mogo.och.bus.passenger.bean.response.* +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.common.module.biz.constant.OchCommonConst import com.mogo.och.common.module.biz.network.OchCommonServiceCallback import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl @@ -40,7 +40,7 @@ object BusPassengerServiceManager { private fun beforeNet():Boolean{ if (draiverSn.isBlank()) { - ToastUtils.showShort("已断开司机屏连接、请联系安全员") + ToastCharterUtils.showShort("已断开司机屏连接、请联系安全员") return true } return false diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt index 1c8b269e14..67326784a8 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt @@ -12,7 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.bean.LoopInfo import com.mogo.och.bus.passenger.bean.event.EventLineSites import com.mogo.och.bus.passenger.bean.response.LineInfoListResponse @@ -145,13 +145,13 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : } override fun onFail(code: Int, msg: String?) { - ToastUtils.showShort("查询站点失败") + ToastCharterUtils.showShort("查询站点失败") mView?.setVisableByTrun(showNetError = true) } override fun onError() { super.onError() - ToastUtils.showShort("查询站点失败") + ToastCharterUtils.showShort("查询站点失败") mView?.setVisableByTrun(showNetError = true) } }) @@ -168,7 +168,7 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("查询线路失败") + ToastCharterUtils.showShort("查询线路失败") mView?.setVisableByTrun(showNetError = true) } @@ -211,7 +211,7 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : ) as ChangeDestMsg CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "接受数据:切换站点${msg}") if (msg.isConfirmed) { - ToastUtils.showShort("站点确定") + ToastCharterUtils.showShort("站点确定") mView?.setEnableSiteStatus(true) checkLine = tempCheckLine checkSite = tempCheckSite @@ -224,7 +224,7 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : CharterPassengerModel.queryOrder() CharterPassengerModel.cleanbroadcastListInfo() } else { - ToastUtils.showShort("司机端拒绝请重新选择") + ToastCharterUtils.showShort("司机端拒绝请重新选择") mView?.hideDataDriverRefuse() } RxUtils.disposeSubscribe(subscribeSelectSite) @@ -237,7 +237,7 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : fun changeSites(siteList: MutableList){ if (!CallerTelematicManager.getClientConnStatus()) { - ToastUtils.showLong("乘客屏无法连接司机屏请联系安全员") + ToastCharterUtils.showLong("乘客屏无法连接司机屏请联系安全员") return } val sentDataSite: MutableList = mutableListOf() @@ -275,13 +275,13 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : RxUtils.disposeSubscribe(subscribeSelectSite) subscribeSelectSite = RxUtils.createSubscribe(120_000){ - ToastUtils.showShort("请联系安全员确认") + ToastCharterUtils.showShort("请联系安全员确认") mView?.hideDataDriverRefuse() } } private fun checkServerStatus() { if (!CallerTelematicManager.getClientConnStatus()) { - ToastUtils.showShort("断开和司机端连接、请联系安全员") + ToastCharterUtils.showShort("断开和司机端连接、请联系安全员") BusPassengerModelLoopManager.removeLoopFunction(TAGLINELOOP) mView?.hideDataDriverRefuse() CallerLogger.d(SceneConstant.M_BUS_P + TAG, "endAni666") @@ -321,19 +321,19 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) : return true } else ->{ - ToastUtils.showShort("自动驾驶中无法切换线路") + ToastCharterUtils.showShort("自动驾驶中无法切换线路") return false } } } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { - ToastUtils.showShort("因车辆正在平行驾驶中无法切换线路") + ToastCharterUtils.showShort("因车辆正在平行驾驶中无法切换线路") return false } else -> {} } } else { - ToastUtils.showShort("请停车后再修改目的地~") + ToastCharterUtils.showShort("请停车后再修改目的地~") return false } return true diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt index 0cc96db153..34f47d9982 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt @@ -4,15 +4,14 @@ import androidx.lifecycle.LifecycleOwner import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant -import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1SoftFragment +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorCallback import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager import com.mogo.och.common.module.manager.devicemanage.data.AirconditionStatus import com.mogo.och.common.module.manager.devicemanage.data.HeaterStatue import com.mogo.och.common.module.manager.devicemanage.data.LightStatus -import com.mogo.och.common.module.voice.VoiceNotice import io.reactivex.disposables.Disposable class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : @@ -146,7 +145,7 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : LightAirconditionDoorStatusManager.airconditionStatus.windSpeed!=windSpeedCmd&& LightAirconditionDoorStatusManager.airconditionStatus.temperature!=temperatureCmd&& LightAirconditionDoorStatusManager.airconditionStatus.pattert!=modeCmd) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } @@ -156,7 +155,7 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : disposeSubscribe(airconditionDisposable) airconditionDisposable = createSubscribe(10000){ if (LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } @@ -170,7 +169,7 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : heaterDisposable = createSubscribe(10000){ if (!LightAirconditionDoorStatusManager.heaterStatue.isOpen&& LightAirconditionDoorStatusManager.heaterStatue.windSpeed!=windSpeedCmd) { - ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") + ToastCharterUtils.showShort("暖风机操作未生效,请稍后重试吧~") } } } @@ -181,7 +180,7 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : disposeSubscribe(heaterDisposable) heaterDisposable = createSubscribe(10000){ if (LightAirconditionDoorStatusManager.heaterStatue.isOpen) { - ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~")//还是开着的 + ToastCharterUtils.showShort("暖风机操作未生效,请稍后重试吧~")//还是开着的 } } } @@ -193,14 +192,14 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(1) subscribeLightTop1 = createSubscribe{ if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } }else{ CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(2) subscribeLightTop1 = createSubscribe{ if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } @@ -212,14 +211,14 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(1) subscribeLightTop2 = createSubscribe{ if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } }else{ CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(2) subscribeLightTop2 = createSubscribe{ if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } @@ -231,14 +230,14 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(1) subscribeLightAtmosphere = createSubscribe{ if (!LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } else { CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(2) subscribeLightAtmosphere = createSubscribe{ if (LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { - ToastUtils.showShort("控制系统繁忙,请稍后再试") + ToastCharterUtils.showShort("控制系统繁忙,请稍后再试") } } } diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt index cb21c0746b..5adf51e9dd 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt @@ -17,7 +17,6 @@ import com.mogo.eagle.core.function.view.SiteMarkerBean import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P import com.mogo.eagle.core.utilcode.util.SharedPrefs -import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.bean.response.LineInfoResponse @@ -32,6 +31,7 @@ import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener import com.mogo.och.bus.passenger.model.OrderStatusEnum import com.mogo.och.bus.passenger.receive.DriverMessage import com.mogo.och.bus.passenger.ui.MainFragment +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.view.MakerWithSiteName import com.mogo.och.bus.passenger.view.MakerWithSiteNamewithCheck import com.mogo.och.common.module.biz.network.OchCommonServiceCallback @@ -163,17 +163,17 @@ class BusPassengerPresenter(view: MainFragment?) : OrderStatusEnum.NoOrderUse -> { when (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state) { IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶 - ToastUtils.showShort("设备未就绪请稍等,请安全员主动停止车辆") + ToastCharterUtils.showShort("设备未就绪请稍等,请安全员主动停止车辆") } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {// - ToastUtils.showShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆") + ToastCharterUtils.showShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆") } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { // 靠边停车 订单结束 靠边停车 CallerAutoPilotControlManager.sendPlanningCmd(1) } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { - ToastUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆") + ToastCharterUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆") } else -> {} } @@ -231,7 +231,7 @@ class BusPassengerPresenter(view: MainFragment?) : UiThreadHandler.post { when (actionStatus) { StopSideStatusManager.Status.NOSTART -> { - ToastUtils.showShort(errorInfo) + ToastCharterUtils.showShort(errorInfo) } StopSideStatusManager.Status.START -> { VoiceNotice.showNotice( @@ -243,14 +243,14 @@ class BusPassengerPresenter(view: MainFragment?) : // 正在靠边停车 } StopSideStatusManager.Status.EndingSuccess -> { - ToastUtils.showShort("靠边停车成功") + ToastCharterUtils.showShort("靠边停车成功") VoiceNotice.showNotice( context.getString(R.string.m1_stop_site_success), AIAssist.LEVEL0 ) } StopSideStatusManager.Status.EndingFaile -> { - ToastUtils.showShort("车辆系统繁忙,请稍后再试") + ToastCharterUtils.showShort("车辆系统繁忙,请稍后再试") } } } @@ -259,9 +259,9 @@ class BusPassengerPresenter(view: MainFragment?) : override fun onDoorStatusCallback(isOpen: Boolean, isFirst: Boolean) { if (!isFirst) { if (isOpen) { - ToastUtils.showShort("已开启车门") + ToastCharterUtils.showShort("已开启车门") } else { - ToastUtils.showShort("已关门车门") + ToastCharterUtils.showShort("已关门车门") } } } @@ -286,7 +286,7 @@ class BusPassengerPresenter(view: MainFragment?) : } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/OrderInfoPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/OrderInfoPresenter.kt index 7601664b77..3b47ae8b55 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/OrderInfoPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/OrderInfoPresenter.kt @@ -6,7 +6,7 @@ import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.callback.ITimeCallback import com.mogo.och.bus.passenger.model.CharterPassengerModel import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment @@ -55,7 +55,7 @@ class OrderInfoPresenter(view: OrderInfoFragment?) : CharterPassengerModel.endOrder(object : OchCommonServiceCallback { override fun onSuccess(data: BaseData?) { if (null != data && 0 == data.code) { - ToastUtils.showShort("结束成功") + ToastCharterUtils.showShort("结束成功") CharterPassengerModel.setEndOrderStatus() mView?.closeDialogContaion() val msg = EndOrderMsg( @@ -70,7 +70,7 @@ class OrderInfoPresenter(view: OrderInfoFragment?) : } override fun onFail(code: Int, msg: String) { - ToastUtils.showShort("$code:$msg") + ToastCharterUtils.showShort("$code:$msg") } }) } diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt index 329942c194..74278922c7 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt @@ -16,7 +16,7 @@ import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView import com.mogo.eagle.core.function.view.SiteMarkerBean import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.map.uicontroller.VisualAngleMode import com.mogo.och.bus.passenger.R @@ -98,10 +98,10 @@ class MainFragment : if(mPresenter?.haveOrder()==true){ openSettingPage(M1ContainFragment.ORDERINFO) }else{ - ToastUtils.showShort("请确认订单") + ToastCharterUtils.showShort("请确认订单") } }else{ - ToastUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver)) + ToastCharterUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver)) } } bb_boorombar.setLineClickListener{ @@ -128,6 +128,7 @@ class MainFragment : showNoviceGuidanceFragment() } debug_change_modle.setOnClickListener { + ToastCharterUtils.showShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆") when (HdMapBuildConfig.currentCarVrIconRes) { R.raw.aiqinghao -> { mPresenter?.setCarChangeListener(OrderInfoResponse.M1_FAMILY) diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/OrderSiteItemAdapter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/OrderSiteItemAdapter.kt index 5090eb95e0..76413221d5 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/OrderSiteItemAdapter.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/OrderSiteItemAdapter.kt @@ -8,7 +8,7 @@ import android.widget.ImageView import android.widget.TextView import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.bean.event.EventLineSites import com.mogo.och.bus.passenger.bean.response.LineInfoResponse @@ -96,9 +96,9 @@ class OrderSiteItemAdapter( checkChangeListener?.onCheckListener(tempInfo) } else { if (siteInfo.isNear) { - ToastUtils.showShort("您已在此站点附近") + ToastCharterUtils.showShort("您已在此站点附近") } else { - ToastUtils.showShort("站点已过,请选择返程路线") + ToastCharterUtils.showShort("站点已过,请选择返程路线") } } } diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/RecyclerVideoAdapter.java b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/RecyclerVideoAdapter.java index 18ed099f60..8fac0b6982 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/RecyclerVideoAdapter.java +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/adapter/RecyclerVideoAdapter.java @@ -10,7 +10,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; -import com.mogo.eagle.core.utilcode.util.ToastUtils; +import com.mogo.och.bus.passenger.utils.ToastCharterUtils; import com.mogo.och.bus.passenger.R; import com.mogo.och.bus.passenger.bean.TaxiPassengerVideoPlay; import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack; @@ -102,12 +102,12 @@ public class RecyclerVideoAdapter extends RecyclerView.Adapter {// 不可自动驾驶 - ToastUtils.showShort("设备未就绪请稍等") + ToastCharterUtils.showShort("设备未就绪请稍等") } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {// onceRegisterAutoStatus() @@ -90,7 +90,7 @@ class GoViewWithArrive @JvmOverloads constructor( CharterPassengerModel.leaveStation() } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { - ToastUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") + ToastCharterUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") } else -> {} } @@ -119,7 +119,7 @@ class GoViewWithArrive @JvmOverloads constructor( startAutoTimeOut = RxUtils.createSubscribe(20_000) { if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { val string = AbsMogoApplication.getApp().getString(R.string.m1_start_auto_fail) - ToastUtils.showLong(string) + ToastCharterUtils.showLong(string) } CharterPassengerModel.setAutoStatusCallback(TAG, null) } diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/StopSiteView.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/StopSiteView.kt index 9469c4035e..444c35b3da 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/StopSiteView.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/StopSiteView.kt @@ -1,19 +1,12 @@ package com.mogo.och.bus.passenger.ui.view.bottom.impl -import android.annotation.SuppressLint import android.content.Context import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.MotionEvent -import android.view.View -import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.ActivityUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView import com.mogo.och.common.module.utils.SoundPoolHelper @@ -38,17 +31,17 @@ class StopSiteView @JvmOverloads constructor( private fun stopSite(){ when (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state) { IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶 - ToastUtils.showShort("设备未就绪请稍等,请稍后再试") + ToastCharterUtils.showShort("设备未就绪请稍等,请稍后再试") } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {// - ToastUtils.showShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试") + ToastCharterUtils.showShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试") } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { // 靠边停车 CallerAutoPilotControlManager.sendPlanningCmd(1) } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { - ToastUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") + ToastCharterUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") } else -> {} } diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/utils/ToastCharterUtils.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/utils/ToastCharterUtils.kt index d60f472a45..93f17a75f9 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/utils/ToastCharterUtils.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/utils/ToastCharterUtils.kt @@ -18,4 +18,29 @@ object ToastCharterUtils { marker.layout(0, 0, marker.measuredWidth, marker.measuredHeight) ToastUtils.showShort(marker) } + fun showLong(toastText:String){ + val context = ActivityUtils.getTopActivity() + val marker = ToastCharterView(context) + marker.setText(toastText) + marker.measure( + View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(context, 145f), View.MeasureSpec.UNSPECIFIED), + View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(context, 34f), View.MeasureSpec.EXACTLY) + ) + marker.layout(0, 0, marker.measuredWidth, marker.measuredHeight) + ToastUtils.showLong(marker) + } + + fun showShort(toastText:String?){ + toastText?.let { + val context = ActivityUtils.getTopActivity() + val marker = ToastCharterView(context) + marker.setText(toastText) + marker.measure( + View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(context, 145f), View.MeasureSpec.UNSPECIFIED), + View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(context, 34f), View.MeasureSpec.EXACTLY) + ) + marker.layout(0, 0, marker.measuredWidth, marker.measuredHeight) + ToastUtils.showShort(marker) + } + } } \ No newline at end of file diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt index 3bbef62e5d..73c5ba7cb7 100644 --- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt +++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt @@ -18,7 +18,7 @@ import androidx.appcompat.widget.AppCompatImageView import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.app.ActivityCompat import com.mogo.eagle.core.utilcode.util.TimeTransformUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.bus.passenger.utils.ToastCharterUtils import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.utils.FullVideoUtils @@ -141,7 +141,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer { override fun setStateAndUi(state: Int) { super.setStateAndUi(state) if(state==CURRENT_STATE_PLAYING_BUFFERING_START){ - ToastUtils.showShort("加载中请稍等") + ToastCharterUtils.showShort("加载中请稍等") } } @@ -265,7 +265,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer { override fun onError(what: Int, extra: Int) { super.onError(what, extra) mThumbImageViewLayout?.visibility = View.VISIBLE - ToastUtils.showLong("哎呀,出错了,看看其他视频吧") + ToastCharterUtils.showLong("哎呀,出错了,看看其他视频吧") currentTime = -1 if(isIfCurrentIsFullscreen){ smalllPlayer?.clearFullscreenLayout(this) diff --git a/OCH/mogo-och-charter-passenger/src/main/res/drawable/charter_p_toast_shape.xml b/OCH/mogo-och-charter-passenger/src/main/res/drawable/charter_p_toast_shape.xml index 7a2823a326..bfa4b479b1 100644 --- a/OCH/mogo-och-charter-passenger/src/main/res/drawable/charter_p_toast_shape.xml +++ b/OCH/mogo-och-charter-passenger/src/main/res/drawable/charter_p_toast_shape.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/OCH/mogo-och-charter-passenger/src/main/res/layout/charter_p_view_toast.xml b/OCH/mogo-och-charter-passenger/src/main/res/layout/charter_p_view_toast.xml index eeefa3536d..4dc65ef199 100644 --- a/OCH/mogo-och-charter-passenger/src/main/res/layout/charter_p_view_toast.xml +++ b/OCH/mogo-och-charter-passenger/src/main/res/layout/charter_p_view_toast.xml @@ -13,13 +13,13 @@ android:background="@drawable/charter_p_toast_shape" android:button="@null" android:gravity="center" - android:paddingStart="@dimen/dp_62" - android:paddingTop="@dimen/dp_32" - android:paddingEnd="@dimen/dp_62" - android:paddingBottom="@dimen/dp_32" - android:textColor="@color/bus_p_m1_112b57" - android:textSize="34dp" - android:layout_marginBottom="@dimen/dp_50" + android:paddingStart="@dimen/dp_31" + android:paddingTop="@dimen/dp_16" + android:paddingEnd="@dimen/dp_31" + android:paddingBottom="@dimen/dp_16" + android:textColor="@color/bus_p_m1_203555" + android:textSize="25dp" + android:layout_marginBottom="@dimen/dp_76" tools:text="18" />