[charter]

[3.2.0]
[新的吐司样式]
This commit is contained in:
yangyakun
2023-05-24 18:21:08 +08:00
parent 1291104903
commit d53821d62f
21 changed files with 119 additions and 112 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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<SiteInfoResponse.SiteInfo>){
if (!CallerTelematicManager.getClientConnStatus()) {
ToastUtils.showLong("乘客屏无法连接司机屏请联系安全员")
ToastCharterUtils.showLong("乘客屏无法连接司机屏请联系安全员")
return
}
val sentDataSite: MutableList<LineSite> = 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

View File

@@ -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("控制系统繁忙,请稍后再试")
}
}
}

View File

@@ -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")
}
})

View File

@@ -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<BaseData> {
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")
}
})
}

View File

@@ -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)

View File

@@ -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("站点已过,请选择返程路线")
}
}
}

View File

@@ -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<RecyclerItemVideo
@Override
public void onPlayError(String url, Object... objects) {
ToastUtils.showLong("哎呀,出错了,看看其他视频吧");
ToastCharterUtils.INSTANCE.showLong("哎呀,出错了,看看其他视频吧");
}
@Override
public void onClickStartError(String url, Object... objects) {
ToastUtils.showLong("哎呀,出错了,看看其他视频吧");
ToastCharterUtils.INSTANCE.showLong("哎呀,出错了,看看其他视频吧");
}
});
}

View File

@@ -17,7 +17,7 @@ import com.mogo.eagle.core.utilcode.util.AppStateManager
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
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.presenter.DebugWatchDogPresenter
import com.mogo.och.bus.passenger.ui.MainFragment
@@ -45,7 +45,7 @@ class DebugViewWatchDogFragment :
actv_password_submit.setOnClickListener {
val text = acet_close.text
if(text==null||text.isEmpty()){
ToastUtils.showShort("请输入密码")
ToastCharterUtils.showShort("请输入密码")
}else{
if(text.toString() == "123987"){
dismissAllowingStateLoss()
@@ -54,7 +54,7 @@ class DebugViewWatchDogFragment :
}
ToggleDebugView.toggleDebugView.toggle(requireContext())
}else{
ToastUtils.showShort("请输入正确密码")
ToastCharterUtils.showShort("请输入正确密码")
}
}
}

View File

@@ -24,6 +24,7 @@ import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1VideoFragment
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment
import com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
import com.mogo.och.bus.passenger.utils.ToastCharterUtils
import com.mogo.och.common.module.biz.constant.LoginStatusManager
import kotlinx.android.synthetic.main.m1_contain_fragment.*
import org.greenrobot.eventbus.EventBus
@@ -136,11 +137,11 @@ class M1ContainFragment :
if(mPresenter?.haveOrder()==true){
}else{
ToastUtils.showShort("请确认订单")
ToastCharterUtils.showShort("请确认订单")
return@setOrderInfoClickListener
}
}else{
ToastUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver))
ToastCharterUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver))
return@setOrderInfoClickListener
}

View File

@@ -11,7 +11,7 @@ import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.utilcode.kotlin.onClick
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.och.bus.passenger.utils.ToastCharterUtils
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.bean.response.LineInfoResponse
import com.mogo.och.bus.passenger.bean.response.SiteInfoResponse
@@ -119,7 +119,7 @@ class M1OrderLineFragment :
tv_site_submit.onClick {
CharterPassengerModel.switchLine5minWait?.let {
if (!it.isDisposed) {
ToastUtils.showShort("选择线路后5分钟内不可用选")
ToastCharterUtils.showShort("选择线路后5分钟内不可用选")
return@onClick
}
}

View File

@@ -21,7 +21,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.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.ClickUtils
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.och.bus.passenger.R
import com.mogo.och.bus.passenger.bean.Temperature
@@ -550,22 +550,22 @@ class M1SoftFragment :
if (leftLight) {
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_close_light1)
tv_light_top_01.isChecked = true
if(!isFirst) ToastUtils.showShort("打开顶灯1")
if(!isFirst) ToastCharterUtils.showShort("打开顶灯1")
} else {
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_open_light1)
tv_light_top_01.isChecked = false
if(!isFirst) ToastUtils.showShort("关闭顶灯1")
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯1")
}
}
fun setLightTop2View(rightLight: Boolean, isFirst: Boolean){
if (rightLight) {
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_close_light2)
tv_light_top_02.isChecked = true
if(!isFirst) ToastUtils.showShort("打开顶灯2")
if(!isFirst) ToastCharterUtils.showShort("打开顶灯2")
} else {
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_open_light2)
tv_light_top_02.isChecked = false
if(!isFirst) ToastUtils.showShort("关闭顶灯2")
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯2")
}
}
fun setLightAtmosphereView(atmosphereLight: Boolean, isFirst: Boolean){
@@ -573,12 +573,12 @@ class M1SoftFragment :
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_close_atmosphere)
tv_light_atmosphere.isChecked = true
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_select)
if(!isFirst) ToastUtils.showShort("打开氛围灯")
if(!isFirst) ToastCharterUtils.showShort("打开氛围灯")
} else {
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_open_atmosphere)
tv_light_atmosphere.isChecked = false
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_nor)
if(!isFirst) ToastUtils.showShort("关闭氛围灯")
if(!isFirst) ToastCharterUtils.showShort("关闭氛围灯")
}
}

View File

@@ -7,15 +7,9 @@ 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.R
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.m1_bottom_stop_site.view.*
open class BottomClickView @JvmOverloads constructor(

View File

@@ -2,18 +2,11 @@ package com.mogo.och.bus.passenger.ui.view.bottom.impl
import android.content.Context
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
import com.mogo.och.common.module.utils.SoundPoolHelper
import io.reactivex.disposables.Disposable
class CloseDoorView @JvmOverloads constructor(
context: Context,

View File

@@ -15,7 +15,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
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.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.callback.ICharterPassengerAutoStatusChangeCallback
import com.mogo.och.bus.passenger.model.CharterPassengerModel
@@ -74,12 +74,12 @@ class GoViewWithArrive @JvmOverloads constructor(
if (LightAirconditionDoorStatusManager.doorStatus.isOpen) {
val string = AbsMogoApplication.getApp().getString(R.string.m1_close_door_and_startauto)
ToastUtils.showShort(string)
ToastCharterUtils.showShort(string)
return
}
when (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
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)
}

View File

@@ -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 -> {}
}

View File

@@ -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)
}
}
}

View File

@@ -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)

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/bus_p_m1_B3EFF6FF"/>
<corners android:radius="@dimen/dp_26"/>
<corners android:radius="@dimen/dp_13"/>
</shape>

View File

@@ -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" />
</LinearLayout>