Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0
This commit is contained in:
@@ -394,6 +394,7 @@ object CharterPassengerModel {
|
||||
}
|
||||
}
|
||||
if (order.lineId == null || order.lineId == 0L || order.siteId == null || order.siteId == 0L) {
|
||||
this.orderInfo = orderData
|
||||
// 去选线路和站点
|
||||
setOrderStatus(OrderStatusEnum.OrderNoLine)
|
||||
} else {
|
||||
@@ -401,7 +402,10 @@ object CharterPassengerModel {
|
||||
if (this.orderInfo?.lineId != orderData.lineId) {// 线路变更
|
||||
// 查询自动驾驶轨迹
|
||||
queryLocusByLineId(order.lineId)
|
||||
this.orderInfo = orderData
|
||||
setOrderStatus(OrderStatusEnum.OrdersWithLine)
|
||||
}else{
|
||||
this.orderInfo = orderData
|
||||
}
|
||||
//计算终点距离
|
||||
mLocationGCJ02?.let { currentInfo ->
|
||||
@@ -425,8 +429,6 @@ object CharterPassengerModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 设置id
|
||||
this.orderInfo = orderData
|
||||
// 启动时间校准
|
||||
startCalibrationLoop()
|
||||
}
|
||||
|
||||
@@ -8,14 +8,13 @@ import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
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.GsonUtils
|
||||
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
|
||||
@@ -28,23 +27,16 @@ import com.mogo.och.bus.passenger.callback.IOrderChangeCallback
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
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.view.MakerWithSiteName
|
||||
import com.mogo.och.bus.passenger.view.MakerWithSiteNamewithCheck
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorCallback
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
@@ -57,6 +49,11 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
|
||||
private val lindIdAndView = ConcurrentHashMap<Long, MakerWithSiteNamewithCheck?>()
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusPassengerPresenter"
|
||||
private const val KEY4SHOWNOVICEGUIDANCE = "showNoviceGuidanceOrderNor"
|
||||
|
||||
}
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
CharterPassengerModel.init()
|
||||
@@ -64,7 +61,7 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
CharterPassengerModel.setStationDistanceListener(TAG, this)
|
||||
CharterPassengerModel.setCarTypeChangeListener(this)
|
||||
CharterPassengerModel.setStatusChangeListener(TAG, this)
|
||||
CallerTelematicListenerManager.addListener(TAG, msgReceived)
|
||||
CallerTelematicListenerManager.addListener(TAG, DriverMessage)
|
||||
OCHPlanningStopSideStatusManager.addListener(TAG, this)
|
||||
setCarChangeListener(R.raw.m1)
|
||||
|
||||
@@ -96,48 +93,6 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
}
|
||||
}
|
||||
|
||||
val msgReceived = object : IReceivedMsgListener {
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
UiThreadHandler.post {
|
||||
if (type == OchCommonConst.BUSINESS_STRING) {
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
BaseDPMsg::class.java
|
||||
) as BaseDPMsg
|
||||
when (msg.type) {
|
||||
DPMsgType.TYPE_OPEN_CLOSE_DOOR.type -> {
|
||||
CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "收到数据:开关门")
|
||||
val doorStatus = LightAirconditionDoorStatusManager.doorStatus
|
||||
if (doorStatus.isOpen) {
|
||||
LightAirconditionDoorManager.go2OpenDoor(false)
|
||||
} else {
|
||||
LightAirconditionDoorManager.go2OpenDoor(true)
|
||||
}
|
||||
}
|
||||
DPMsgType.TYPE_COMMON.type -> {
|
||||
CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "收到数据:常规数据")
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
DPCommonOperationMsg::class.java
|
||||
) as DPCommonOperationMsg
|
||||
pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp(), msg.msg)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun pushOperationalToMsgBox(time: Long, content: String, type: Int = -1) {
|
||||
playDI()
|
||||
OCHSocketMessageManager.pushAppOperationalMsgBox(time, content, type)
|
||||
}
|
||||
|
||||
private fun playDI() {
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算剩余距离和剩余时间
|
||||
*/
|
||||
@@ -161,10 +116,6 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
setDistanceAndTime(dis.toString(), disUnit, time.toString(), arriveTime)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusPassengerPresenter"
|
||||
}
|
||||
|
||||
override fun setCarChangeListener(productType: Int?) {
|
||||
when (productType) {
|
||||
OrderInfoResponse.M1_LOVE -> {
|
||||
@@ -191,8 +142,11 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
OrderStatusEnum.Nothing -> {}
|
||||
OrderStatusEnum.NoOrderUnuse -> {
|
||||
mView?.closeOpenAndCloseDoor()
|
||||
clearShowNoviceGuidanceSharedPrefs()
|
||||
}
|
||||
OrderStatusEnum.OrderNoLine -> {
|
||||
showNoviceGuidance()
|
||||
}
|
||||
OrderStatusEnum.OrderNoLine -> {}
|
||||
OrderStatusEnum.OrdersWithLine -> {}
|
||||
OrderStatusEnum.NoOrderUse -> {
|
||||
when (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state) {
|
||||
@@ -220,6 +174,35 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
}
|
||||
}
|
||||
|
||||
private fun clearShowNoviceGuidanceSharedPrefs() {
|
||||
SharedPrefs.getInstance(context).remove(KEY4SHOWNOVICEGUIDANCE)
|
||||
}
|
||||
|
||||
private fun showNoviceGuidance() {
|
||||
CallerLogger.d(M_BUS_P + TAG, "showNoviceGuidance")
|
||||
val currentOrderInfo = CharterPassengerModel.getCurrentOrderInfo()
|
||||
currentOrderInfo?.orderNo?.let {order->
|
||||
val stringSet = SharedPrefs.getInstance(context).getStringSet(KEY4SHOWNOVICEGUIDANCE)
|
||||
fun setData2SP(){
|
||||
val orderNoSet = mutableSetOf(order)
|
||||
SharedPrefs.getInstance(context).putStringSet(KEY4SHOWNOVICEGUIDANCE, orderNoSet)
|
||||
}
|
||||
if(stringSet==null){
|
||||
setData2SP()
|
||||
}else{
|
||||
if (stringSet.contains(order)) {
|
||||
return
|
||||
}else{
|
||||
setData2SP()
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post({
|
||||
mView?.showNoviceGuidanceFragment()
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun setEndStationCallBack(
|
||||
siteId: Long?,
|
||||
siteName: String?,
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.NoviceGuidanceFragment
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
|
||||
class CharterPassengerNoviceGuidancePresenter(view: NoviceGuidanceFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<NoviceGuidanceFragment?>(view) {
|
||||
companion object{
|
||||
private const val TAG = "BusPassengerFunctionPresenter"
|
||||
}
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
}
|
||||
|
||||
override fun onResume(owner: LifecycleOwner) {
|
||||
super.onResume(owner)
|
||||
val currentOrderInfo = CharterPassengerModel.getCurrentOrderInfo()
|
||||
currentOrderInfo?.let {
|
||||
mView?.setUserPhoneInfo(it.passengerPhone?:"")
|
||||
try {
|
||||
mView?.setStartTimeAndEndTime(
|
||||
DateTimeUtil.formatLongToString(it.startTime!!, DateTimeUtil.HH_mm),
|
||||
DateTimeUtil.formatLongToString(it.endTime!!, DateTimeUtil.HH_mm))
|
||||
}catch (e:Exception){
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
super.onDestroy(owner)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.mogo.och.bus.passenger.receive
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
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.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.common.module.bean.dpmsg.AppConnectMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
|
||||
object DriverMessage: IReceivedMsgListener {
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
UiThreadHandler.post {
|
||||
if (type == OchCommonConst.BUSINESS_STRING) {
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
BaseDPMsg::class.java
|
||||
) as BaseDPMsg
|
||||
when (msg.type) {
|
||||
DPMsgType.TYPE_OPEN_CLOSE_DOOR.type -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + BaseDPMsg.TAG, "收到数据:开关门")
|
||||
val doorStatus = LightAirconditionDoorStatusManager.doorStatus
|
||||
if (doorStatus.isOpen) {
|
||||
LightAirconditionDoorManager.go2OpenDoor(false)
|
||||
} else {
|
||||
LightAirconditionDoorManager.go2OpenDoor(true)
|
||||
}
|
||||
}
|
||||
DPMsgType.TYPE_COMMON.type -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + BaseDPMsg.TAG, "收到数据:常规数据")
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
DPCommonOperationMsg::class.java
|
||||
) as DPCommonOperationMsg
|
||||
pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp(), msg.msg)
|
||||
}
|
||||
DPMsgType.TYPE_COMMON.type -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + BaseDPMsg.TAG, "收到数据:常规数据")
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
AppConnectMsg::class.java
|
||||
) as AppConnectMsg
|
||||
if (msg.isViewShow) { //消息盒子显示内容
|
||||
OCHSocketMessageManager.pushAppOperationalMsgBox(
|
||||
DateTimeUtil.getCurrentTimeStamp(), msg.msg,
|
||||
OCHSocketMessageManager.OPERATION_SYSTEM
|
||||
)
|
||||
}
|
||||
if(msg.isPlay){
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoiceWithLevel(msg.msg, AIAssist.LEVEL1)
|
||||
if(msg.msg.contains("核销成功")){
|
||||
RxUtils.createSubscribe(15_000) {
|
||||
val string = AbsMogoApplication.getApp().getString(R.string.m1_welcome_tts)
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoiceWithLevel(string, AIAssist.LEVEL1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun pushOperationalToMsgBox(time: Long, content: String, type: Int = -1) {
|
||||
playDI()
|
||||
OCHSocketMessageManager.pushAppOperationalMsgBox(time, content, type)
|
||||
}
|
||||
|
||||
private fun playDI() {
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(AbsMogoApplication.getApp(), R.raw.m1_voice_di)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.DebugViewWatchDogFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1CarUserNoOrderFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.NoviceGuidanceFragment
|
||||
import com.mogo.och.bus.passenger.view.statusbar.StatusBarView
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import kotlinx.android.synthetic.main.m1_main_fragment.*
|
||||
@@ -45,6 +46,7 @@ class MainFragment :
|
||||
private var bpFunctionGroupDialogFragment: WeakReference<M1ContainFragment>? = null
|
||||
private var debugViewWatchDogFragment: WeakReference<DebugViewWatchDogFragment>? = null
|
||||
private var m1CarUserNoOrderFragment: WeakReference<M1CarUserNoOrderFragment>? = null
|
||||
private var noviceGuidanceFragment: WeakReference<NoviceGuidanceFragment>? = null
|
||||
|
||||
private val endStation =
|
||||
BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources,
|
||||
@@ -107,9 +109,6 @@ class MainFragment :
|
||||
aciv_enter_video.setOnClickListener{
|
||||
openSettingPage(M1ContainFragment.VIDEOTAB)
|
||||
}
|
||||
debug_arrive_dest.setOnClickListener {
|
||||
CharterPassengerModel.arriveDest()
|
||||
}
|
||||
aciv_map_2_default.setOnClickListener {
|
||||
omvOverMap.displayCustomOverView()
|
||||
val controller = getMapUIController()
|
||||
@@ -126,6 +125,13 @@ class MainFragment :
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
debug_arrive_dest.setOnClickListener {
|
||||
CharterPassengerModel.arriveDest()
|
||||
}
|
||||
debug_show_noviceGuidance.setOnClickListener {
|
||||
showNoviceGuidanceFragment()
|
||||
}
|
||||
}
|
||||
|
||||
private fun openSettingPage(tab: String) {
|
||||
@@ -223,6 +229,13 @@ class MainFragment :
|
||||
val m1CarUserNoOrderFragment = m1CarUserNoOrderFragment?.get()
|
||||
M1CarUserNoOrderFragment.showOpenAndCloseDoor(childFragmentManager,parentFragmentManager,m1CarUserNoOrderFragment)
|
||||
}
|
||||
fun showNoviceGuidanceFragment() {
|
||||
if (noviceGuidanceFragment?.get() == null) {
|
||||
noviceGuidanceFragment = WeakReference(NoviceGuidanceFragment.newInstance())
|
||||
}
|
||||
val noviceGuidanceFragmentWeak = noviceGuidanceFragment?.get()
|
||||
NoviceGuidanceFragment.showNoviceGuidance(childFragmentManager,parentFragmentManager,noviceGuidanceFragmentWeak)
|
||||
}
|
||||
fun closeOpenAndCloseDoor(){
|
||||
val bpFunctionGroup = m1CarUserNoOrderFragment?.get()
|
||||
bpFunctionGroup?.let {
|
||||
@@ -257,11 +270,11 @@ class MainFragment :
|
||||
fun changeDebugView(debugView: DebugView) {
|
||||
when (debugView.type) {
|
||||
StatusBarView.bizz -> {
|
||||
if(debug_arrive_dest.visibility==View.GONE||
|
||||
debug_arrive_dest.visibility==View.INVISIBLE){
|
||||
debug_arrive_dest.visibility = View.VISIBLE
|
||||
if(group_debug.visibility==View.GONE||
|
||||
group_debug.visibility==View.INVISIBLE){
|
||||
group_debug.visibility = View.VISIBLE
|
||||
}else{
|
||||
debug_arrive_dest.visibility = View.GONE
|
||||
group_debug.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
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.*
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.CharterPassengerNoviceGuidancePresenter
|
||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_fragment.*
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_welcome_1_fragment.*
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_welcome_2_fragment.*
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_welcome_3_fragment.*
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_welcome_4_fragment.*
|
||||
import kotlinx.android.synthetic.main.m1_novice_guidance_welcome_fragment.*
|
||||
|
||||
/**
|
||||
* 新手引导
|
||||
*/
|
||||
class NoviceGuidanceFragment :
|
||||
MvpDialogFragment<NoviceGuidanceFragment?, CharterPassengerNoviceGuidancePresenter?>(),
|
||||
View.OnClickListener {
|
||||
|
||||
private var m1_novice_guidance_tts = true
|
||||
private var m1_novice_guidance_door_tts = true
|
||||
private var m1_novice_guidance_stop_site_tts = true
|
||||
private var m1_novice_guidance_notice_tts = true
|
||||
private var m1_novice_guidance_complier_tts = true
|
||||
|
||||
private var pageStatus: PageStatus = PageStatus.Startpage
|
||||
|
||||
|
||||
var closeThis: ContainDismiss = object : ContainDismiss {
|
||||
override fun closeDialog() {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "onCreate")
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
//tab = it.getString(SELECTTAB, VIDEOTAB)
|
||||
}
|
||||
savedInstanceState?.let {
|
||||
//tab = it.getString(SELECTTAB, tab)
|
||||
}
|
||||
setStyle(STYLE_NO_TITLE, R.style.DialogFullScreen) //dialog全屏
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_novice_guidance_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
CallerLogger.d(M_BUS_P + TAG, "initViews")
|
||||
setTargetVisable(startGuidance = true)
|
||||
|
||||
v_clikc_go_explore_bg.setOnClickListener {
|
||||
if (pageStatus == PageStatus.Startpage) {
|
||||
setTargetVisable(welcome01 = true)
|
||||
if (m1_novice_guidance_tts) {
|
||||
val m1NoviceGuidanceTts =
|
||||
AbsMogoApplication.getApp().getString(R.string.m1_novice_guidance_tts)
|
||||
VoiceNotice.showNotice(m1NoviceGuidanceTts, AIAssist.LEVEL1)
|
||||
m1_novice_guidance_tts = false
|
||||
}
|
||||
}else if(pageStatus == PageStatus.EndPage){
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
v_next_page_select_line.setOnClickListener {
|
||||
setTargetVisable(welcome02 = true)
|
||||
if (m1_novice_guidance_door_tts) {
|
||||
val m1NoviceGuidanceDoorTts =
|
||||
AbsMogoApplication.getApp().getString(R.string.m1_novice_guidance_door_tts)
|
||||
VoiceNotice.showNotice(m1NoviceGuidanceDoorTts, AIAssist.LEVEL1)
|
||||
m1_novice_guidance_door_tts = false
|
||||
}
|
||||
}
|
||||
|
||||
v_pre_page_go_auto.setOnClickListener {
|
||||
setTargetVisable(welcome01 = true)
|
||||
}
|
||||
v_next_page_go_auto.setOnClickListener {
|
||||
setTargetVisable(welcome03 = true)
|
||||
if (m1_novice_guidance_stop_site_tts) {
|
||||
val m1NoviceGuidanceStopSiteTts =
|
||||
AbsMogoApplication.getApp().getString(R.string.m1_novice_guidance_stop_site_tts)
|
||||
VoiceNotice.showNotice(m1NoviceGuidanceStopSiteTts, AIAssist.LEVEL1)
|
||||
m1_novice_guidance_stop_site_tts = false
|
||||
}
|
||||
}
|
||||
|
||||
v_pre_page_stop_site.setOnClickListener {
|
||||
setTargetVisable(welcome02 = true)
|
||||
}
|
||||
v_next_page_stop_site.setOnClickListener {
|
||||
setTargetVisable(welcome04 = true)
|
||||
if (m1_novice_guidance_notice_tts) {
|
||||
val m1NoviceGuidanceStopSiteTts =
|
||||
AbsMogoApplication.getApp().getString(R.string.m1_novice_guidance_notice_tts)
|
||||
VoiceNotice.showNotice(m1NoviceGuidanceStopSiteTts, AIAssist.LEVEL1)
|
||||
m1_novice_guidance_notice_tts = false
|
||||
}
|
||||
}
|
||||
|
||||
v_pre_page_notice.setOnClickListener {
|
||||
setTargetVisable(welcome03 = true)
|
||||
}
|
||||
v_next_page_notice.setOnClickListener {
|
||||
setTargetVisable(complierGuidance = true)
|
||||
if (m1_novice_guidance_complier_tts) {
|
||||
val m1NoviceGuidanceStopSiteTts =
|
||||
AbsMogoApplication.getApp().getString(R.string.m1_novice_guidance_complier_tts)
|
||||
VoiceNotice.showNotice(m1NoviceGuidanceStopSiteTts, AIAssist.LEVEL1)
|
||||
m1_novice_guidance_complier_tts = false
|
||||
}
|
||||
}
|
||||
|
||||
v_welcome_close_01.setOnClickListener(this)
|
||||
v_welcome_close_02.setOnClickListener(this)
|
||||
v_welcome_close_03.setOnClickListener(this)
|
||||
v_welcome_close_04.setOnClickListener(this)
|
||||
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerLogger.d(M_BUS_P + TAG, "onViewCreated")
|
||||
dialog?.window?.let {
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
it.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
dialog?.setOnShowListener { _ ->
|
||||
it.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setUserPhoneInfo(phone: String) {
|
||||
if (phone.length > 8) {
|
||||
//截取电话号码前三位
|
||||
val phoneNumPre = phone.substring(0, 3);
|
||||
//截取电话号码后四位
|
||||
val phoneNumFix = phone.substring(7);
|
||||
actv_userinfo.text = "$phoneNumPre****$phoneNumFix"
|
||||
} else {
|
||||
actv_userinfo.text = phone
|
||||
}
|
||||
}
|
||||
|
||||
fun setStartTimeAndEndTime(startTime: String, endTime: String) {
|
||||
actv_order_time.text = "$startTime-$endTime"
|
||||
}
|
||||
|
||||
fun setTargetVisable(
|
||||
startGuidance: Boolean = false,
|
||||
welcome01: Boolean = false,
|
||||
welcome02: Boolean = false,
|
||||
welcome03: Boolean = false,
|
||||
welcome04: Boolean = false,
|
||||
complierGuidance: Boolean = false
|
||||
) {
|
||||
if (startGuidance || complierGuidance) {
|
||||
if (startGuidance) {
|
||||
include_welcome.visibility = View.VISIBLE
|
||||
actv_start_guildance.visibility = View.VISIBLE
|
||||
group_complete_guidance.visibility = View.GONE
|
||||
actv_click_go_explore.text = "点击开始探索"
|
||||
pageStatus = PageStatus.Startpage
|
||||
}
|
||||
if (complierGuidance) {
|
||||
include_welcome.visibility = View.VISIBLE
|
||||
actv_start_guildance.visibility = View.GONE
|
||||
group_complete_guidance.visibility = View.VISIBLE
|
||||
actv_click_go_explore.text = "点我进入主页"
|
||||
pageStatus = PageStatus.EndPage
|
||||
}
|
||||
|
||||
} else {
|
||||
include_welcome.visibility = View.GONE
|
||||
actv_start_guildance.visibility = View.GONE
|
||||
group_complete_guidance.visibility = View.GONE
|
||||
}
|
||||
if (welcome01) {
|
||||
include_welcome_01.visibility = View.VISIBLE
|
||||
pageStatus = PageStatus.NoviceGuidanceSelectLine
|
||||
} else {
|
||||
include_welcome_01.visibility = View.GONE
|
||||
}
|
||||
if (welcome02) {
|
||||
include_welcome_02.visibility = View.VISIBLE
|
||||
pageStatus = PageStatus.NoviceGuidanceDoorAndGo
|
||||
} else {
|
||||
include_welcome_02.visibility = View.GONE
|
||||
}
|
||||
if (welcome03) {
|
||||
include_welcome_03.visibility = View.VISIBLE
|
||||
pageStatus = PageStatus.NoviceGuidanceStopSite
|
||||
} else {
|
||||
include_welcome_03.visibility = View.GONE
|
||||
}
|
||||
if (welcome04) {
|
||||
include_welcome_04.visibility = View.VISIBLE
|
||||
pageStatus = PageStatus.NoviceGuidanceNotice
|
||||
} else {
|
||||
include_welcome_04.visibility = View.GONE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onDismiss(dialog: DialogInterface) {
|
||||
super.onDismiss(dialog)
|
||||
m1_novice_guidance_tts = true
|
||||
m1_novice_guidance_door_tts = true
|
||||
m1_novice_guidance_stop_site_tts = true
|
||||
m1_novice_guidance_notice_tts = true
|
||||
m1_novice_guidance_complier_tts = true
|
||||
pageStatus = PageStatus.Startpage
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
CallerLogger.d(M_BUS_P + TAG, "onSaveInstanceState")
|
||||
}
|
||||
|
||||
override fun createPresenter(): CharterPassengerNoviceGuidancePresenter =
|
||||
CharterPassengerNoviceGuidancePresenter(this)
|
||||
|
||||
/**
|
||||
* 重写父类show()方法
|
||||
* 避免出现java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
|
||||
*/
|
||||
override fun show(manager: FragmentManager, tag: String?) {
|
||||
try {
|
||||
var cls = this.javaClass.superclass ?: return
|
||||
while (true) {
|
||||
if (cls.name == "java.lang.Object") {
|
||||
break
|
||||
}
|
||||
cls = cls.superclass!!
|
||||
if (cls == DialogFragment::class.java) {
|
||||
break
|
||||
}
|
||||
}
|
||||
val mDismissed = cls.getDeclaredField("mDismissed")
|
||||
val mShownByMe = cls.getDeclaredField("mShownByMe")
|
||||
mDismissed.isAccessible = true
|
||||
mShownByMe.isAccessible = true
|
||||
mDismissed.setBoolean(this, false)
|
||||
mShownByMe.setBoolean(this, true)
|
||||
if (isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
return
|
||||
}
|
||||
val ft: FragmentTransaction = manager.beginTransaction()
|
||||
ft.add(this, tag)
|
||||
ft.commitAllowingStateLoss()
|
||||
} catch (e: Exception) {
|
||||
Log.e("DialogFragment", "show", e.fillInStackTrace())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "onViewStateRestored")
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "NoviceGuidanceFragment"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(): NoviceGuidanceFragment {
|
||||
val args = Bundle()
|
||||
val fragment = NoviceGuidanceFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
|
||||
|
||||
fun showNoviceGuidance(
|
||||
childFragmentManager: FragmentManager,
|
||||
parentFragmentManager: FragmentManager,
|
||||
bpFunctionGroup: NoviceGuidanceFragment?,
|
||||
) {
|
||||
val fragmentByTag: Fragment? =
|
||||
childFragmentManager.findFragmentByTag(NoviceGuidanceFragment.TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bpFunctionGroup != null) {
|
||||
if (bpFunctionGroup.dialog != null && bpFunctionGroup.dialog!!.isShowing) {
|
||||
return
|
||||
}
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
bpFunctionGroup.show(parentFragmentManager, MainFragment.TAG)
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "展示")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ContainDismiss {
|
||||
fun closeDialog()
|
||||
}
|
||||
|
||||
enum class PageStatus {
|
||||
Startpage,
|
||||
NoviceGuidanceSelectLine,
|
||||
NoviceGuidanceDoorAndGo,
|
||||
NoviceGuidanceStopSite,
|
||||
NoviceGuidanceNotice,
|
||||
EndPage
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_40"/>
|
||||
<gradient android:startColor="@color/bus_p_m1_1466FB" android:endColor="@color/bus_p_m1_43CEFE"/>
|
||||
</shape>
|
||||
@@ -39,16 +39,6 @@
|
||||
android:layout_width="@dimen/dp_148"
|
||||
android:layout_height="@dimen/dp_150"/>
|
||||
|
||||
<TextView
|
||||
android:text="到站"
|
||||
android:id="@+id/debug_arrive_dest"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_47"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mapBizView"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
|
||||
android:layout_height="@dimen/dp_400"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
@@ -264,6 +254,30 @@
|
||||
app:layout_constraintEnd_toEndOf="@+id/viewBusPM1MsgBoxButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewBusPM1MsgBoxButton"/>
|
||||
|
||||
<TextView
|
||||
android:text="到站"
|
||||
android:id="@+id/debug_arrive_dest"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_47"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mapBizView"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:text="展示引导页面"
|
||||
android:id="@+id/debug_show_noviceGuidance"
|
||||
app:layout_constraintTop_toBottomOf="@+id/debug_arrive_dest"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mapBizView"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_debug"
|
||||
app:constraint_referenced_ids="debug_arrive_dest,debug_show_noviceGuidance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/cl_container"
|
||||
android:orientation="vertical"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<include
|
||||
android:id="@+id/include_welcome"
|
||||
layout="@layout/m1_novice_guidance_welcome_fragment"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/include_welcome_01"
|
||||
android:visibility="gone"
|
||||
layout="@layout/m1_novice_guidance_welcome_1_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/include_welcome_02"
|
||||
layout="@layout/m1_novice_guidance_welcome_2_fragment"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/include_welcome_03"
|
||||
layout="@layout/m1_novice_guidance_welcome_3_fragment"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/include_welcome_04"
|
||||
layout="@layout/m1_novice_guidance_welcome_4_fragment"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/charter_p_guidace_1"
|
||||
android:id="@+id/cl_container"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<View
|
||||
android:id="@+id/v_next_page_select_line"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_width="@dimen/dp_280"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_welcome_close_01"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_64"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/charter_p_guidace_2"
|
||||
android:id="@+id/cl_container"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_welcome_close_02"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_64"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_pre_page_go_auto"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/v_next_page_go_auto"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_marginEnd="@dimen/dp_54"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_next_page_go_auto"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_pre_page_go_auto"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/charter_p_guidace_3"
|
||||
android:id="@+id/cl_container"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<View
|
||||
android:id="@+id/v_welcome_close_03"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_64"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_pre_page_stop_site"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/v_next_page_stop_site"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_marginEnd="@dimen/dp_54"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_next_page_stop_site"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_pre_page_stop_site"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/charter_p_guidace_4"
|
||||
android:id="@+id/cl_container"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<View
|
||||
android:id="@+id/v_welcome_close_04"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_64"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_pre_page_notice"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/v_next_page_notice"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_marginEnd="@dimen/dp_54"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_next_page_notice"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_pre_page_notice"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_41"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_108"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/charter_p_image_welcome_nor"
|
||||
android:id="@+id/cl_container"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_start_guildance"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_186"
|
||||
android:layout_marginStart="@dimen/dp_280"
|
||||
android:text="欢迎乘坐蘑菇车联自动驾驶亲情号!"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/dp_52"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/bus_p_m1_101c35"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_complete_guidance_title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_158"
|
||||
android:layout_marginStart="@dimen/dp_280"
|
||||
android:visibility="gone"
|
||||
android:text="太棒了!"
|
||||
android:textSize="@dimen/dp_63"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/bus_p_m1_101c35"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_complete_guidance_value"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_complete_guidance_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_complete_guidance_title"
|
||||
android:text="您已完成乘车指南,更多功能欢迎探索~\n蘑菇小助手预祝您旅途愉快!"
|
||||
android:textSize="@dimen/dp_43"
|
||||
android:textColor="@color/bus_p_m1_101c35"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_complete_guidance"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="actv_complete_guidance_title,actv_complete_guidance_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_contain_order_info"
|
||||
android:src="@drawable/charter_p_image_welcome_info_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_258"
|
||||
android:layout_marginBottom="@dimen/dp_119"
|
||||
android:layout_width="@dimen/dp_631"
|
||||
android:layout_height="@dimen/dp_583"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_userinfo_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_contain_order_info"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_contain_order_info"
|
||||
android:layout_marginTop="@dimen/dp_59"
|
||||
android:layout_marginStart="@dimen/dp_100"
|
||||
android:text="用户信息:"
|
||||
android:textColor="@color/bus_p_m1_20418D"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_userinfo"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_userinfo_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_userinfo_title"
|
||||
android:text="*** *** ***"
|
||||
android:textColor="@color/bus_p_m1_222222"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_time_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_userinfo"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_userinfo"
|
||||
android:layout_marginTop="@dimen/dp_29"
|
||||
android:text="用车时间:"
|
||||
android:textColor="@color/bus_p_m1_20418D"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_time_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_order_time_title"
|
||||
android:text="9:00-18:00"
|
||||
android:textColor="@color/bus_p_m1_222222"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_clikc_go_explore_bg"
|
||||
android:background="@drawable/charter_p_welcome_explore"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_contain_order_info"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_contain_order_info"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_contain_order_info"
|
||||
android:layout_marginBottom="@dimen/dp_81"
|
||||
android:layout_width="@dimen/dp_360"
|
||||
android:layout_height="@dimen/dp_80"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_click_go_explore"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_clikc_go_explore_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_clikc_go_explore_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_clikc_go_explore_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_clikc_go_explore_bg"
|
||||
android:text="点击开始探索"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -35,6 +35,8 @@
|
||||
<color name="bus_p_m1_b8c2d8">#B8C2D8</color>
|
||||
<color name="bus_p_m1_d7e5f5">#D7E5F5</color>
|
||||
<color name="bus_p_m1_e0efff">#E0EFFF</color>
|
||||
<color name="bus_p_m1_101c35">#101C35</color>
|
||||
<color name="bus_p_m1_20418D">#20418D</color>
|
||||
<color name="bus_p_m1_662C2D31">#662C2D31</color>
|
||||
<color name="bus_p_m1_332C2D31">#332C2D31</color>
|
||||
|
||||
|
||||
@@ -37,6 +37,31 @@
|
||||
<string name="m1_bottom_reach_time">--:--</string>
|
||||
|
||||
<string name="m1_stop_site">靠边停车</string>
|
||||
<string name="m1_welcome_tts">欢迎乘坐蘑菇车联自动驾驶小巴车,按照桌面屏幕的指引,开始探索吧!小蘑菇预祝您旅途愉快</string>
|
||||
|
||||
<string name="m1_novice_guidance_tts">铛铛~接下来由蘑菇小助手为您\'指引方向\'!</string>
|
||||
<string name="m1_novice_guidance_door_tts">关闭车门后,点击‘出发’按钮启程,车辆自动判断开始自动驾驶啦!咻~</string>
|
||||
<string name="m1_novice_guidance_stop_site_tts">点击‘停车’按钮后,车辆自动靠边停车,车辆停稳后就可以下车游玩啦!</string>
|
||||
<string name="m1_novice_guidance_notice_tts">最后,蘑菇小助手为您送上乘车小贴士~</string>
|
||||
<string name="m1_novice_guidance_complier_tts">太棒了!您已完成乘车指南,更多功能欢迎探索~蘑菇小助手预祝您旅途愉快</string>
|
||||
|
||||
<!-- <string name="m1_novice_guidance_tts">先关闭车门再启动吧~</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆起步,扶稳坐好哟,前方到站XXX</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">自驾系统繁忙,稍后再试试吧~</string>-->
|
||||
|
||||
<!-- <string name="m1_novice_guidance_tts">正在为您靠边停车,扶稳坐好哟</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">靠边停车成功</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆系统繁忙,请稍后再试</string>-->
|
||||
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆行驶中不可以开门哦~</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆系统繁忙,稍后再试试吧~</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">车辆即将到达xxxx,请乘客带好随身物品,有序下车,欢迎下次乘坐哦!</string>-->
|
||||
|
||||
<!-- <string name="m1_novice_guidance_tts">5分钟后包车就要结束了,稍后小助手会自动为您寻找停车点</string>-->
|
||||
<!-- <string name="m1_novice_guidance_tts">感谢您体验蘑菇车联自动驾驶小巴车,本次旅程已结束,期待下次再见</string>-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -207,7 +207,6 @@ internal object V2NIdentifyDrawer {
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
Logger.d(TAG, "--- onAutopilotIdentifyDataUpdate -- : trafficData: ${ trafficData?.joinToString(",") }")
|
||||
val shiGong = trafficData?.filter { it.type == 501 || it.type == 502 }
|
||||
if (shiGong != null && shiGong.isNotEmpty()) {
|
||||
drawShiGong(shiGong)
|
||||
|
||||
@@ -385,6 +385,7 @@
|
||||
<dimen name="dp_357">357dp</dimen>
|
||||
<dimen name="dp_358">358dp</dimen>
|
||||
<dimen name="dp_359">359dp</dimen>
|
||||
<dimen name="dp_360">360dp</dimen>
|
||||
<dimen name="dp_366">366dp</dimen>
|
||||
<dimen name="dp_367">367dp</dimen>
|
||||
<dimen name="dp_368">368dp</dimen>
|
||||
|
||||
@@ -142,12 +142,12 @@ public class AMapWrapper implements IMogoMap {
|
||||
batchMarkerOptions.delayStrategy = false;
|
||||
batchMarkerOptions.ruleAngle = FunctionBuildConfig.isBeautyMode ? 8.0f : 0f;
|
||||
batchMarkerOptions.controlIcon = 1;
|
||||
batchMarkerOptions.duration = (int) time;
|
||||
batchMarkerOptions.satelliteTime = time;
|
||||
batchMarkerOptions.deleteRule = 1;
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(batchMarkerOptions);
|
||||
}
|
||||
|
||||
|
||||
BatchMarkerOptions aiBatchMarkerOptions = new BatchMarkerOptions();
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
@@ -169,13 +169,12 @@ public class AMapWrapper implements IMogoMap {
|
||||
return;
|
||||
}
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
BatchMarkerOptions aiBatchMarkerOptions = new BatchMarkerOptions();
|
||||
// 最后一个参数,是否管理锚点的删除
|
||||
aiBatchMarkerOptions.list = markerOptionsArrayList;
|
||||
aiBatchMarkerOptions.delayStrategy = false;
|
||||
aiBatchMarkerOptions.ruleAngle = FunctionBuildConfig.isBeautyMode ? 8.0f : 0f;
|
||||
aiBatchMarkerOptions.controlIcon = 1;
|
||||
aiBatchMarkerOptions.duration = (int) time;
|
||||
aiBatchMarkerOptions.satelliteTime = time;
|
||||
aiBatchMarkerOptions.deleteRule = 0;
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(aiBatchMarkerOptions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user