[6.0.0] 轨迹计算逻辑处理
This commit is contained in:
@@ -59,6 +59,8 @@ import com.mogo.och.common.module.manager.distancemamager.ITrajectoryListener
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager.addDistanceListener
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager.addTrajectoryListener
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager.setStationPoint
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjLocations
|
||||
import com.mogo.och.taxi.bean.ContrailListRespBean
|
||||
import com.mogo.och.taxi.bean.OrderDetail
|
||||
import com.mogo.och.taxi.bean.PrepareTaskRespBean
|
||||
@@ -103,13 +105,14 @@ object TaxiModel {
|
||||
|
||||
private var mContext: Context? = null
|
||||
|
||||
private var mCurrentTaskAndOrder : QueryCurrentTaskRespBean.Result? = null //当前任务和订单
|
||||
private var mCurrentTaskAndOrder: QueryCurrentTaskRespBean.Result? = null //当前任务和订单
|
||||
|
||||
private var mUntruthTask : StartServiceRespBean.Result? = null // 前往出车点的伪任务, 后台并不算做真正的任务
|
||||
private var mUntruthTask: StartServiceRespBean.Result? = null // 前往出车点的伪任务, 后台并不算做真正的任务
|
||||
|
||||
private var mOrderContrails : MutableList<ContrailListRespBean.Result>? = null // 运营单(接驾任务和送驾任务的轨迹集合)
|
||||
private var mOrderContrails: MutableList<ContrailListRespBean.Result>? =
|
||||
null // 运营单(接驾任务和送驾任务的轨迹集合)
|
||||
|
||||
private var mCurTaskContrail : ContrailListRespBean.Result? = null //当前在跑的任务的轨迹信息
|
||||
private var mCurTaskContrail: ContrailListRespBean.Result? = null //当前在跑的任务的轨迹信息
|
||||
|
||||
private var mADASStatusCallback //Model->Presenter:自动驾驶状态相关
|
||||
: ITaxiADASStatusCallback? = null
|
||||
@@ -196,8 +199,6 @@ object TaxiModel {
|
||||
}
|
||||
|
||||
fun release() {
|
||||
// startOrStopOrderLoop(false)
|
||||
startOrStopCalculateRouteInfo(false)
|
||||
releaseListeners()
|
||||
loginService = null
|
||||
}
|
||||
@@ -272,15 +273,15 @@ object TaxiModel {
|
||||
return valueOf(order.orderStatus)
|
||||
}
|
||||
|
||||
fun getCurTaskAndOrder(): QueryCurrentTaskRespBean.Result?{
|
||||
return mCurrentTaskAndOrder
|
||||
fun getCurTaskAndOrder(): QueryCurrentTaskRespBean.Result? {
|
||||
return mCurrentTaskAndOrder
|
||||
}
|
||||
|
||||
fun getCurOrderContrails(): MutableList<ContrailListRespBean.Result>?{
|
||||
fun getCurOrderContrails(): MutableList<ContrailListRespBean.Result>? {
|
||||
return mOrderContrails
|
||||
}
|
||||
|
||||
fun getCurTaskContrail(): ContrailListRespBean.Result?{
|
||||
fun getCurTaskContrail(): ContrailListRespBean.Result? {
|
||||
return mCurTaskContrail
|
||||
}
|
||||
|
||||
@@ -298,7 +299,7 @@ object TaxiModel {
|
||||
|
||||
val currentOrder = mCurrentTaskAndOrder!!.order
|
||||
|
||||
if (currentOrder != null){
|
||||
if (currentOrder != null) {
|
||||
if (currentOrder!!.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.code) {
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
// 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后,置true
|
||||
@@ -316,7 +317,7 @@ object TaxiModel {
|
||||
}
|
||||
clearAutopilotControlParameters()
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
d(SceneConstant.M_TAXI + TAG, "setIPCDemoMode:false")
|
||||
setIPCDemoMode(false)
|
||||
@@ -343,18 +344,17 @@ object TaxiModel {
|
||||
updateAutopilotControlParameters(null)
|
||||
}
|
||||
|
||||
fun updateCurrentTaskAndOrder(result: QueryCurrentTaskRespBean.Result?){
|
||||
fun updateCurrentTaskAndOrder(result: QueryCurrentTaskRespBean.Result?) {
|
||||
mCurrentTaskAndOrder = result
|
||||
updateNativeCurrentOrder(result)
|
||||
}
|
||||
|
||||
fun updateUntruthTask(untruthTask : StartServiceRespBean.Result?) {
|
||||
fun updateUntruthTask(untruthTask: StartServiceRespBean.Result?) {
|
||||
mUntruthTask = untruthTask
|
||||
}
|
||||
|
||||
//清除任务订单信息
|
||||
fun clearCurrentOCHOrder() {
|
||||
startOrStopCalculateRouteInfo(false)
|
||||
mCurrentTaskAndOrder = null
|
||||
clearAutopilotControlParameters()
|
||||
TaxiTrajectoryManager.getInstance().syncTrajectoryInfo()
|
||||
@@ -395,7 +395,7 @@ object TaxiModel {
|
||||
return
|
||||
}
|
||||
|
||||
if (mCurTaskContrail == null){
|
||||
if (mCurTaskContrail == null) {
|
||||
e(SceneConstant.M_TAXI + TAG, "no order or order is empty.")
|
||||
ToastUtils.showShort("轨迹信息不存在!")
|
||||
}
|
||||
@@ -468,7 +468,7 @@ object TaxiModel {
|
||||
return null
|
||||
}
|
||||
|
||||
if (mCurTaskContrail == null){
|
||||
if (mCurTaskContrail == null) {
|
||||
e(SceneConstant.M_TAXI + TAG, "curTaskContrail is empty.")
|
||||
return null
|
||||
}
|
||||
@@ -488,11 +488,16 @@ object TaxiModel {
|
||||
if (parameters.autoPilotLine == null) {
|
||||
parameters.autoPilotLine = AutopilotControlParameters.AutoPilotLine(
|
||||
mCurrentTaskAndOrder!!.lineId,
|
||||
mCurTaskContrail!!.csvFileUrl, mCurTaskContrail!!.csvFileMd5,
|
||||
mCurTaskContrail!!.txtFileUrl, mCurTaskContrail!!.txtFileMd5,
|
||||
mCurTaskContrail!!.contrailSaveTime, "", // todo 这里原来传的是carModel, 现在没有这个信息, 是否传businessType
|
||||
mCurTaskContrail!!.csvFileUrlDPQP, mCurTaskContrail!!.csvFileMd5DPQP,
|
||||
mCurTaskContrail!!.txtFileUrlDPQP, mCurTaskContrail!!.txtFileMd5DPQP,
|
||||
mCurTaskContrail!!.csvFileUrl,
|
||||
mCurTaskContrail!!.csvFileMd5,
|
||||
mCurTaskContrail!!.txtFileUrl,
|
||||
mCurTaskContrail!!.txtFileMd5,
|
||||
mCurTaskContrail!!.contrailSaveTime,
|
||||
"", // todo 这里原来传的是carModel, 现在没有这个信息, 是否传businessType
|
||||
mCurTaskContrail!!.csvFileUrlDPQP,
|
||||
mCurTaskContrail!!.csvFileMd5DPQP,
|
||||
mCurTaskContrail!!.txtFileUrlDPQP,
|
||||
mCurTaskContrail!!.txtFileMd5DPQP,
|
||||
mCurTaskContrail!!.contrailSaveTimeDPQP
|
||||
)
|
||||
}
|
||||
@@ -521,7 +526,7 @@ object TaxiModel {
|
||||
).toDouble()
|
||||
i(SceneConstant.M_TAXI + TAG, "judgeTaskStartStation() distance = $distance")
|
||||
if (distance <= TaxiUnmannedConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
arriveSite(startSite.siteId,false)
|
||||
arriveSite(startSite.siteId, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -574,11 +579,11 @@ object TaxiModel {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (null == mogoLocation) return
|
||||
|
||||
if (mUntruthTask != null){
|
||||
judgeUntruthStation(mUntruthTask,mogoLocation)
|
||||
if (mUntruthTask != null) {
|
||||
judgeUntruthStation(mUntruthTask, mogoLocation)
|
||||
}
|
||||
|
||||
if (checkCurrentTask()){
|
||||
if (checkCurrentTask()) {
|
||||
judgeTaskStartStation(mogoLocation)
|
||||
judgeTaskEndSiteStation(mogoLocation)
|
||||
}
|
||||
@@ -589,13 +594,19 @@ object TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
private fun judgeUntruthStation(virtualTask: StartServiceRespBean.Result?, currentLocation: MogoLocation) {
|
||||
private fun judgeUntruthStation(
|
||||
virtualTask: StartServiceRespBean.Result?,
|
||||
currentLocation: MogoLocation
|
||||
) {
|
||||
if (mUntruthTask == null || virtualTask == null) return
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
virtualTask.gcjLon, virtualTask.gcjLat,
|
||||
currentLocation.longitude, currentLocation.latitude
|
||||
).toDouble()
|
||||
i(SceneConstant.M_TAXI + TAG, "judgeEndStation() ${virtualTask.siteName} distance = $distance")
|
||||
i(
|
||||
SceneConstant.M_TAXI + TAG,
|
||||
"judgeEndStation() ${virtualTask.siteName} distance = $distance"
|
||||
)
|
||||
if (distance <= TaxiUnmannedConst.ARRIVE_AT_START_STATION_DISTANCE) { // 15米内到站
|
||||
arriveSite(virtualTask.siteId, true)
|
||||
}
|
||||
@@ -605,33 +616,34 @@ object TaxiModel {
|
||||
* 到站(起点、终点)
|
||||
* isArriveEndSite true 终点, false 起点
|
||||
*/
|
||||
public fun arriveSite(siteId: Long, isArriveEndSite: Boolean) {
|
||||
arriveSite(mContext!!,siteId,object : OchCommonServiceCallback<BaseData>{
|
||||
fun arriveSite(siteId: Long, isArriveEndSite: Boolean) {
|
||||
arriveSite(mContext!!, siteId, object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (data == null || data.code != 0) return
|
||||
d(SceneConstant.M_TAXI + TAG,GsonUtil.jsonFromObject(data))
|
||||
d(SceneConstant.M_TAXI + TAG, GsonUtil.jsonFromObject(data))
|
||||
mUntruthTask = null
|
||||
if (isArriveEndSite){
|
||||
if (isArriveEndSite) {
|
||||
//到目的站后去查询下一个任务
|
||||
startPrepareTask(siteId)
|
||||
cleanStation()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
d(SceneConstant.M_TAXI + TAG,"$code $msg")
|
||||
d(SceneConstant.M_TAXI + TAG, "$code $msg")
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
private fun startTask(lineId: Long) {
|
||||
startTask(mContext!!, lineId,object : OchCommonServiceCallback<BaseData>{
|
||||
startTask(mContext!!, lineId, object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
d(SceneConstant.M_TAXI + TAG,GsonUtil.jsonFromObject(data))
|
||||
d(SceneConstant.M_TAXI + TAG, GsonUtil.jsonFromObject(data))
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
d(SceneConstant.M_TAXI + TAG,"$code $msg")
|
||||
d(SceneConstant.M_TAXI + TAG, "$code $msg")
|
||||
}
|
||||
|
||||
})
|
||||
@@ -639,20 +651,20 @@ object TaxiModel {
|
||||
|
||||
private fun startPrepareTask(siteId: Long) {
|
||||
UiThreadHandler.postDelayed({
|
||||
prepareTask(mContext!!,siteId,object : OchCommonServiceCallback<PrepareTaskRespBean>{
|
||||
prepareTask(mContext!!, siteId, object : OchCommonServiceCallback<PrepareTaskRespBean> {
|
||||
override fun onSuccess(data: PrepareTaskRespBean?) {
|
||||
d(SceneConstant.M_TAXI + TAG,GsonUtil.jsonFromObject(data))
|
||||
d(SceneConstant.M_TAXI + TAG, GsonUtil.jsonFromObject(data))
|
||||
if (data == null || data.code != 0) return
|
||||
//去下载轨迹, 下发给工控机下载
|
||||
queryTaskContrail(Array(1) { data.lineId })
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
d(SceneConstant.M_TAXI + TAG,"$code $msg")
|
||||
d(SceneConstant.M_TAXI + TAG, "$code $msg")
|
||||
}
|
||||
|
||||
})
|
||||
},TIMER_PREPARE_TASK_INTERVAL)
|
||||
}, TIMER_PREPARE_TASK_INTERVAL)
|
||||
}
|
||||
|
||||
private fun judgeTaskEndSiteStation(currentLocation: MogoLocation) {
|
||||
@@ -691,7 +703,7 @@ object TaxiModel {
|
||||
return
|
||||
}
|
||||
i(SceneConstant.M_TAXI + TAG, "judgeEndStation() = 刚过站且在15m内")
|
||||
arriveSite(endSite.siteId,true)
|
||||
arriveSite(endSite.siteId, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -724,7 +736,7 @@ object TaxiModel {
|
||||
ToastUtils.showShort("订单状态不匹配该操作!")
|
||||
return
|
||||
}
|
||||
arriveSite(mCurrentTaskAndOrder?.startSite!!.siteId,false)
|
||||
arriveSite(mCurrentTaskAndOrder?.startSite!!.siteId, false)
|
||||
}
|
||||
|
||||
fun setArriveAtEndStation() {
|
||||
@@ -732,11 +744,11 @@ object TaxiModel {
|
||||
ToastUtils.showShort("无任务!")
|
||||
return
|
||||
}
|
||||
arriveSite(mCurrentTaskAndOrder?.endSite!!.siteId,true)
|
||||
arriveSite(mCurrentTaskAndOrder?.endSite!!.siteId, true)
|
||||
}
|
||||
|
||||
fun toStartTask() {
|
||||
if (!checkCurrentTask()){
|
||||
if (!checkCurrentTask()) {
|
||||
ToastUtils.showShort("无任务!")
|
||||
return
|
||||
}
|
||||
@@ -836,7 +848,10 @@ object TaxiModel {
|
||||
|
||||
override fun onAutopilotSNRequest() {}
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: ArrivalNotification?) {
|
||||
i(SceneConstant.M_TAXI + TAG, "onAutopilotArriveAtStation = " + arrivalNotification.toString())
|
||||
i(
|
||||
SceneConstant.M_TAXI + TAG,
|
||||
"onAutopilotArriveAtStation = " + arrivalNotification.toString()
|
||||
)
|
||||
if (((arrivalNotification == null) || !checkCurrentTask()
|
||||
|| (getCurOrderStatus() === TaxiOrderStatusEnum.ArriveAtEnd))
|
||||
) {
|
||||
@@ -859,8 +874,8 @@ object TaxiModel {
|
||||
private fun arriveTerminal() {
|
||||
if (!checkCurrentOrder()) return
|
||||
val endSite = mCurrentTaskAndOrder!!.order!!.orderEndSite
|
||||
if (endSite != null){
|
||||
arriveSite(endSite.siteId,true)
|
||||
if (endSite != null) {
|
||||
arriveSite(endSite.siteId, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -884,29 +899,27 @@ object TaxiModel {
|
||||
*
|
||||
*/
|
||||
fun setRouteLineMarker() {
|
||||
// TODO: 设置地图上的marker 只设置有明确站点marker ,当前执行的任务或者订单的,但是不设置虚拟任务的
|
||||
// val currentOCHOrder = getCurrentOrder()
|
||||
// if (currentOCHOrder != null) {
|
||||
// if ((currentOCHOrder.startSiteGcjPoint == null) || currentOCHOrder.startSiteGcjPoint.isEmpty() || (currentOCHOrder.startSiteGcjPoint.size < 2) || (
|
||||
// currentOCHOrder.endSiteGcjPoint == null) || currentOCHOrder.endSiteGcjPoint.isEmpty() || (currentOCHOrder.endSiteGcjPoint.size < 2)
|
||||
// ) {
|
||||
// cleanLineMarker()
|
||||
// return
|
||||
// }
|
||||
// val startStation = LatLng(
|
||||
// currentOCHOrder.startSiteGcjPoint[1],
|
||||
// currentOCHOrder.startSiteGcjPoint[0]
|
||||
// )
|
||||
// val endStation = LatLng(
|
||||
// currentOCHOrder.endSiteGcjPoint[1],
|
||||
// currentOCHOrder.endSiteGcjPoint[0]
|
||||
// )
|
||||
// if (mAutopilotPlanningCallback != null) {
|
||||
// mAutopilotPlanningCallback!!.setLineMarker(startStation, endStation)
|
||||
// }
|
||||
val curTaskAndOrder = getCurTaskAndOrder()
|
||||
if (curTaskAndOrder != null) {
|
||||
if (curTaskAndOrder.startSite == null || curTaskAndOrder.endSite == null) {
|
||||
cleanLineMarker()
|
||||
return
|
||||
}
|
||||
val startStation = LatLng(
|
||||
curTaskAndOrder.startSite!!.gcjLat,
|
||||
curTaskAndOrder.startSite!!.gcjLon
|
||||
)
|
||||
val endStation = LatLng(
|
||||
curTaskAndOrder.endSite!!.gcjLat,
|
||||
curTaskAndOrder.endSite!!.gcjLon
|
||||
)
|
||||
if (mAutopilotPlanningCallback != null) {
|
||||
mAutopilotPlanningCallback!!.setLineMarker(startStation, endStation)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun cleanLineMarker() {
|
||||
private fun cleanLineMarker() {
|
||||
if (mAutopilotPlanningCallback != null) {
|
||||
mAutopilotPlanningCallback!!.setLineMarker(null, null)
|
||||
}
|
||||
@@ -918,30 +931,29 @@ object TaxiModel {
|
||||
* @param models
|
||||
*/
|
||||
fun updateOrderRouteInfo(models: List<MessagePad.Location>) {
|
||||
// if (models.isEmpty()) return
|
||||
// if (mCurrentOrder == null) return
|
||||
// d(SceneConstant.M_TAXI + TAG, "--------计算出sumLength开始---------- ")
|
||||
//
|
||||
// //转换成高德坐标系
|
||||
// if (mRoutePoints!!.size > 0) {
|
||||
// mRoutePoints.clear()
|
||||
// }
|
||||
// mRoutePoints.addAll(coordinateConverterWgsToGcjLocations(mContext, models))
|
||||
// startDynamicCalculateRouteInfo()
|
||||
if (models.isEmpty()) return
|
||||
if (mCurrentTaskAndOrder == null || mCurrentTaskAndOrder!!.startSite == null
|
||||
|| mCurrentTaskAndOrder!!.endSite == null) return
|
||||
d(SceneConstant.M_TAXI + TAG, "--------计算出sumLength开始---------- ")
|
||||
|
||||
//转换成高德坐标系
|
||||
if (mRoutePoints!!.size > 0) {
|
||||
mRoutePoints.clear()
|
||||
}
|
||||
mRoutePoints.addAll(coordinateConverterWgsToGcjLocations(mContext, models))
|
||||
startDynamicCalculateRouteInfo()
|
||||
}
|
||||
|
||||
private fun startDynamicCalculateRouteInfo() {
|
||||
// d(
|
||||
// SceneConstant.M_TAXI + TAG,
|
||||
// "--------mCurrentOCHOrder---------- $mCurrentOrder"
|
||||
// )
|
||||
// d(SceneConstant.M_TAXI + TAG, "--------mRoutePoints.size---------- " + mRoutePoints!!.size)
|
||||
// //开启实时计算剩余距离,剩余时间,预计时间
|
||||
// startOrStopCalculateRouteInfo(true)
|
||||
// AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi()
|
||||
// if (mOrderStatusCallback != null) {
|
||||
// mOrderStatusCallback!!.onNaviToEnd(false, false)
|
||||
// }
|
||||
d(
|
||||
SceneConstant.M_TAXI + TAG,
|
||||
"--------mCurrentTaskAndOrder---------- $mCurrentTaskAndOrder"
|
||||
)
|
||||
d(SceneConstant.M_TAXI + TAG, "--------mRoutePoints.size---------- " + mRoutePoints!!.size)
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi()
|
||||
if (mOrderStatusCallback != null) {
|
||||
mOrderStatusCallback!!.onNaviToEnd(false, false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateDistance(lastSumLength: Float) {
|
||||
@@ -951,15 +963,12 @@ object TaxiModel {
|
||||
("---lastSumLength: " + lastSumLength + "----lastTime : " + lastTime
|
||||
+ " thread = " + Thread.currentThread().name)
|
||||
)
|
||||
// if (mCurrentOrder != null) {
|
||||
// mCurrentOrder!!.decreaseTravelDistance(lastSumLength.toDouble())
|
||||
// }
|
||||
// if (mOrderStatusCallback != null) {
|
||||
// mOrderStatusCallback!!.onCurrentOrderDistToEndChanged(
|
||||
// lastSumLength.toLong(),
|
||||
// lastTime.toLong()
|
||||
// )
|
||||
// }
|
||||
if (mOrderStatusCallback != null) {
|
||||
mOrderStatusCallback!!.onCurrentOrderDistToEndChanged(
|
||||
lastSumLength.toLong(),
|
||||
lastTime.toLong()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private val distanceListener: IDistanceListener = object : IDistanceListener {
|
||||
@@ -985,15 +994,15 @@ object TaxiModel {
|
||||
var temp: LatLng?
|
||||
for (mogoLocation: MogoLocation in routeArrivied) {
|
||||
temp = LatLng(
|
||||
mogoLocation.getLatitude(),
|
||||
mogoLocation.getLongitude()
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
)
|
||||
routeArriviedTemp.add(temp)
|
||||
}
|
||||
for (mogoLocation: MogoLocation in routeArriving) {
|
||||
temp = LatLng(
|
||||
mogoLocation.getLatitude(),
|
||||
mogoLocation.getLongitude()
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
)
|
||||
routeArrivingTemp.add(temp)
|
||||
}
|
||||
@@ -1007,21 +1016,6 @@ object TaxiModel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始轮询计算剩余里程和时间
|
||||
*
|
||||
* @param isStart
|
||||
*/
|
||||
private fun startOrStopCalculateRouteInfo(isStart: Boolean) {
|
||||
d(SceneConstant.M_TAXI + TAG, "startOrStopOrderLoop() $isStart")
|
||||
if (isStart) {
|
||||
TaxiModelLoopManager.getInstance().startCalculateRouteInfoLoop()
|
||||
} else {
|
||||
mRoutePoints!!.clear()
|
||||
TaxiModelLoopManager.getInstance().stopCalculateRouteInfoLoop()
|
||||
}
|
||||
}
|
||||
|
||||
// 登出
|
||||
fun logout() {
|
||||
loginService!!.loginOut(getChassisLocationGCJ02().latitude, getChassisLocationGCJ02().longitude)
|
||||
@@ -1029,12 +1023,13 @@ object TaxiModel {
|
||||
|
||||
//导航去订单终点目的地
|
||||
fun startNaviToEndStation(isShow: Boolean) {
|
||||
if (mRoutePoints!!.size > 0) { //使用自驾轨迹
|
||||
if (mRoutePoints == null) return
|
||||
if (mRoutePoints.size > 0) { //使用自驾轨迹
|
||||
if (mOrderStatusCallback != null) {
|
||||
mOrderStatusCallback!!.onNaviToEnd(false, isShow)
|
||||
}
|
||||
} else { //若直接要显示导航地图则直接导航, 若不是则2s后若无轨迹数据使用高德导航
|
||||
if (isShow && mRoutePoints.size == 0 && mOrderStatusCallback != null) {
|
||||
if (isShow && mOrderStatusCallback != null) {
|
||||
mOrderStatusCallback!!.onNaviToEnd(true, true)
|
||||
} else {
|
||||
UiThreadHandler.postDelayed({
|
||||
@@ -1045,21 +1040,30 @@ object TaxiModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setStation() {
|
||||
// val currentOCHOrder = getCurrentOrder()
|
||||
// if (currentOCHOrder != null) {
|
||||
// val startStation = MogoLocation()
|
||||
// startStation.longitude = currentOCHOrder.startSiteGcjPoint[0]
|
||||
// startStation.latitude = currentOCHOrder.startSiteGcjPoint[1]
|
||||
// val endStation = MogoLocation()
|
||||
// endStation.longitude = currentOCHOrder.endSiteGcjPoint[0]
|
||||
// endStation.latitude = currentOCHOrder.endSiteGcjPoint[1]
|
||||
// setStationPoint(startStation, endStation, currentOCHOrder.lineId)
|
||||
// }
|
||||
fun updateStation() {
|
||||
if (mCurrentTaskAndOrder == null) return
|
||||
if (mCurrentTaskAndOrder!!.startSite != null && mCurrentTaskAndOrder!!.endSite != null
|
||||
&& mCurrentTaskAndOrder!!.currentStatus <= TaskStatusEnum.StartTask.code){
|
||||
setStation()
|
||||
}else{
|
||||
cleanStation()
|
||||
}
|
||||
}
|
||||
|
||||
fun cleanStation() {
|
||||
private fun setStation() {
|
||||
val curTaskAndOrder = getCurTaskAndOrder() ?: return
|
||||
if (curTaskAndOrder.startSite != null && curTaskAndOrder.endSite != null) {
|
||||
val startStation = MogoLocation()
|
||||
startStation.longitude = curTaskAndOrder.startSite!!.gcjLon
|
||||
startStation.latitude = curTaskAndOrder.startSite!!.gcjLat
|
||||
val endStation = MogoLocation()
|
||||
endStation.longitude = curTaskAndOrder.endSite!!.gcjLon
|
||||
endStation.latitude = curTaskAndOrder.endSite!!.gcjLat
|
||||
setStationPoint(startStation, endStation, curTaskAndOrder.lineId)
|
||||
}
|
||||
}
|
||||
|
||||
private fun cleanStation() {
|
||||
setStationPoint(null, null, -1L)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.mogo.och.taxi.model;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
*
|
||||
* 管理轮询逻辑(订单轮询、新单轮询、新单抢单结果轮询等等)
|
||||
*/
|
||||
public class TaxiModelLoopManager {
|
||||
|
||||
private static final String TAG = TaxiModelLoopManager.class.getSimpleName();
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final TaxiModelLoopManager INSTANCE = new TaxiModelLoopManager();
|
||||
}
|
||||
|
||||
public static TaxiModelLoopManager getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private CompositeDisposable mCalculateRouteDisposable; //每隔2s计算一次剩余里程和时间
|
||||
|
||||
public void startCalculateRouteInfoLoop() {
|
||||
|
||||
CallerLogger.INSTANCE.i(M_TAXI + TAG, "startCalculateRouteInfoLoop()");
|
||||
if (mCalculateRouteDisposable != null) return;
|
||||
|
||||
mCalculateRouteDisposable = new CompositeDisposable();
|
||||
|
||||
Disposable disposable = loopDynamicCalculateRouteInfo()
|
||||
.doOnSubscribe(new Consumer<Disposable>() {
|
||||
@Override
|
||||
public void accept(Disposable disposable) throws Exception {
|
||||
|
||||
}
|
||||
}).doOnError(new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
}
|
||||
})
|
||||
.delay(TaxiUnmannedConst.LOOP_CALCULATEROUTE_2S, TimeUnit.MILLISECONDS, true) // 设置delayError为true,表示出现错误的时候也需要延迟5s进行通知,达到无论是请求正常还是请求失败,都是5s后重新订阅,即重新请求。
|
||||
.subscribeOn(Schedulers.io())
|
||||
.repeat() // repeat保证请求成功后能够重新订阅。
|
||||
.retry() // retry保证请求失败后能重新订阅
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<Integer>() {
|
||||
@Override
|
||||
public void accept(Integer integer) throws Exception {
|
||||
}
|
||||
});
|
||||
mCalculateRouteDisposable.add(disposable);
|
||||
}
|
||||
|
||||
private Observable<Integer> loopDynamicCalculateRouteInfo(){
|
||||
return Observable.create(new ObservableOnSubscribe<Integer>() {
|
||||
@Override
|
||||
public void subscribe(ObservableEmitter<Integer> emitter) throws Exception {
|
||||
if (emitter.isDisposed()) return;
|
||||
// TaxiModel.INSTANCE.dynamicCalculateRouteInfo();
|
||||
emitter.onComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void stopCalculateRouteInfoLoop() {
|
||||
if (mCalculateRouteDisposable != null) {
|
||||
CallerLogger.INSTANCE.i(M_TAXI + TAG, "stopCalculateRouteInfoLoop()");
|
||||
mCalculateRouteDisposable.dispose();
|
||||
mCalculateRouteDisposable = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,6 +277,8 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
|
||||
TaxiModel.updateCurrentTaskAndOrder(result)
|
||||
|
||||
TaxiModel.updateStation()
|
||||
|
||||
updateTaskAndOrderUi()
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
|
||||
@Override
|
||||
public void onCurrentOrderDistToEndChanged(long meters, long timeInSecond) {
|
||||
|
||||
runOnUIThread(() -> mView.onCurrentOrderDistToEndChanged(meters,timeInSecond));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getOverla
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
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.map.overlay.core.Level
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel
|
||||
@@ -150,13 +151,20 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
if (untruthTask == null) return
|
||||
updateUntruthTaskView()
|
||||
updateUntruthTaskUIData(untruthTask.siteName)
|
||||
updateUntruthTaskOtherInfo()
|
||||
}
|
||||
|
||||
private fun updateUntruthTaskOtherInfo() {
|
||||
if (mCurrentUntruthTask != null){
|
||||
startNaviToStation(false, mCurrentUntruthTask!!.gcjLat,
|
||||
mCurrentUntruthTask!!.gcjLon)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateUntruthTaskUIData(siteName: String) {
|
||||
taskStatus.text = resources.getString(R.string.task_start_to_virtual_site)
|
||||
startStationName.text = resources.getString(R.string.task_current_loc)
|
||||
endStationName.text = siteName
|
||||
// TODO("剩余历程和时间导航去更新taskOtherInfo")
|
||||
}
|
||||
|
||||
private fun updateUntruthTaskView() {
|
||||
@@ -181,6 +189,26 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
naviToEnd.setOnClickListener(this)
|
||||
}
|
||||
|
||||
private fun updateRemainDistanceAndTime(isVoicePlay: Boolean){
|
||||
//根据任务状态计算剩余历程和时间
|
||||
if (mCurrentTaskAndOrder == null) return
|
||||
|
||||
if (mCurrentTaskAndOrder!!.endSite != null
|
||||
&& mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.StartTask.code){
|
||||
|
||||
startNaviToStation(isVoicePlay,mCurrentTaskAndOrder!!.endSite!!.gcjLat,
|
||||
mCurrentTaskAndOrder!!.endSite!!.gcjLat)
|
||||
return
|
||||
}
|
||||
|
||||
if (mCurrentTaskAndOrder!!.startSite != null
|
||||
&& mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.GetTask.code){ //演练任务和送驾任务
|
||||
|
||||
startNaviToStation(isVoicePlay,mCurrentTaskAndOrder!!.startSite!!.gcjLat,
|
||||
mCurrentTaskAndOrder!!.startSite!!.gcjLat)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务和订单信息
|
||||
*/
|
||||
@@ -214,7 +242,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
taskTypeTv.text = resources.getString(R.string.task_exercise)
|
||||
startStationName.text = startSite.siteName
|
||||
endStationName.text = endSite.siteName
|
||||
// TODO("剩余历程和时间导航去更新taskOtherInfo")
|
||||
}
|
||||
TaskTypeEnum.ToOrderEndTask.code,TaskTypeEnum.ToOrderStartTask.code -> {// 送驾/接驾任务任务
|
||||
if (order == null) return
|
||||
@@ -224,9 +251,10 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
startStationName.text = order.orderStartSite?.siteName
|
||||
endStationName.text = order.orderEndSite?.siteName
|
||||
updateOrderUI(order)
|
||||
// TODO("剩余历程和时间导航去更新taskOtherInfo")
|
||||
}
|
||||
}
|
||||
|
||||
updateRemainDistanceAndTime(false)
|
||||
}
|
||||
|
||||
private fun updateOrderUI(order: OrderDetail) {
|
||||
@@ -570,11 +598,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
closeOrderDialog.show()
|
||||
}
|
||||
|
||||
// showNotice(
|
||||
// mActivity!!.getString(
|
||||
// R.string.module_och_taxi_new_order
|
||||
// )
|
||||
|
||||
private fun clearOrderTag() {
|
||||
taskOtherInfo.text = "距离 - - 公里,用时 - - 分"
|
||||
}
|
||||
@@ -615,33 +638,13 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
}
|
||||
.show()
|
||||
}
|
||||
} else if (v.id == naviToStart.id) {
|
||||
if (mTaxiFragment != null) {
|
||||
showNaviToStartStationFragment()
|
||||
}
|
||||
} else if (v.id == naviToEnd.id) {
|
||||
if (mTaxiFragment != null) {
|
||||
showNaviToEndStationFragment(true)
|
||||
}
|
||||
} else if (v.id == naviToStart.id || v.id == naviToEnd.id) {
|
||||
showNaviToEndStationFragment(true)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示/隐藏 前往乘客上车点的导航
|
||||
**/
|
||||
private fun showNaviToStartStationFragment() {
|
||||
// if (mCurrentTaskAndOrder != null &&
|
||||
// mCurrentTaskAndOrder!!.order.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.code
|
||||
// ) {
|
||||
// val orderStartStationLat = mCurrentOrder!!.startSiteGcjPoint[1]
|
||||
// val orderStartStationLng = mCurrentOrder!!.startSiteGcjPoint[0]
|
||||
// mTaxiFragment!!.showAmapNaviToStationFragment(true)
|
||||
// startNaviToStation(true, orderStartStationLat, orderStartStationLng)
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示/隐藏 前往乘客目的地的导航
|
||||
* 显示/隐藏 前往任务目的地的导航
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
@@ -689,11 +692,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun onCurrentNaviDistAndTimeChanged(meters: Int, timeInSecond: Long) {
|
||||
updateDistanceAndTime(meters.toLong(), timeInSecond)
|
||||
// if (mCurrentTaskAndOrder != null
|
||||
// && mCurrentTaskAndOrder!!.order.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.code
|
||||
// ) {
|
||||
// mTaxiFragment!!.reportToEndDisAndTime(meters, timeInSecond)
|
||||
// }
|
||||
}
|
||||
|
||||
override fun reInitNaviAmap(isPlay: Boolean, isRestart: Boolean) {
|
||||
@@ -705,42 +703,39 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
mTaxiFragment!!.showAmapNaviToStationFragment(false)
|
||||
return
|
||||
}
|
||||
// UiThreadHandler.postDelayed({
|
||||
// if (mCurrentTaskAndOrder != null &&
|
||||
// mCurrentTaskAndOrder!!.order.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.code
|
||||
// ) {
|
||||
// val orderStartStationLat = mCurrentOrder!!.startSiteGcjPoint[1]
|
||||
// val orderStartStationLng = mCurrentOrder!!.startSiteGcjPoint[0]
|
||||
// startNaviToStation(false, orderStartStationLat, orderStartStationLng)
|
||||
// }
|
||||
// }, 2000)
|
||||
// UiThreadHandler.postDelayed({
|
||||
// if (mCurrentTaskAndOrder != null &&
|
||||
// mCurrentTaskAndOrder!!.order.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.code
|
||||
// ) {
|
||||
// if (naviToStart.visibility == View.GONE) {
|
||||
// naviToStart.visibility = View.VISIBLE
|
||||
// }
|
||||
// }
|
||||
// if (mCurrentTaskAndOrder != null &&
|
||||
// mCurrentTaskAndOrder!!.order.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.code
|
||||
// ) {
|
||||
// if (naviToEnd.visibility == View.GONE) {
|
||||
// naviToEnd.visibility = View.VISIBLE
|
||||
// }
|
||||
// }
|
||||
// }, 3000)
|
||||
UiThreadHandler.postDelayed({
|
||||
updateRemainDistanceAndTime(false)
|
||||
}, 2000)
|
||||
UiThreadHandler.postDelayed({
|
||||
if (mCurrentTaskAndOrder != null &&
|
||||
mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.GetTask.code
|
||||
) {
|
||||
if (naviToStart.visibility == View.GONE) {
|
||||
naviToStart.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
if (mCurrentTaskAndOrder != null &&
|
||||
mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.StartTask.code
|
||||
) {
|
||||
if (naviToEnd.visibility == View.GONE) {
|
||||
naviToEnd.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
fun onNaviToEndAmap(isShow: Boolean) {
|
||||
// if (mCurrentOrder != null &&
|
||||
// mCurrentOrder!!.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.code
|
||||
// ) {
|
||||
// val orderEndStationLat = mCurrentOrder!!.endSiteGcjPoint[1]
|
||||
// val orderEndStationLng = mCurrentOrder!!.endSiteGcjPoint[0]
|
||||
// mTaxiFragment!!.showAmapNaviToStationFragment(isShow)
|
||||
// startNaviToStation(isShow, orderEndStationLat, orderEndStationLng)
|
||||
// }
|
||||
if (mCurrentTaskAndOrder == null) return
|
||||
|
||||
mTaxiFragment!!.showAmapNaviToStationFragment(
|
||||
if (mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.StartTask.code)
|
||||
isShow else true
|
||||
)
|
||||
|
||||
updateRemainDistanceAndTime(
|
||||
if (mCurrentTaskAndOrder!!.currentStatus == TaskStatusEnum.StartTask.code)
|
||||
isShow else true
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.mogo.och.taxi.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
@@ -19,7 +21,6 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.LoginService
|
||||
import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.base.BaseTaxiTabFragment
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum
|
||||
import com.mogo.och.taxi.model.TaxiModel
|
||||
import com.mogo.och.taxi.model.TaxiUnmannedViewModel
|
||||
import com.mogo.och.taxi.network.LoginBusImpl
|
||||
@@ -28,7 +29,6 @@ import com.mogo.och.taxi.ui.unmanned.UnmannedIntent
|
||||
import com.mogo.och.taxi.utils.TPRouteDataTestUtils
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.module_mogo_och_operation_status
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.taxi_driver_role_tv
|
||||
import kotlinx.coroutines.flow.map
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
@@ -241,6 +241,12 @@ class TaxiFragment : BaseTaxiTabFragment<TaxiFragment, TaxiPresenter>(),
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun onCurrentOrderDistToEndChanged(meters: Long, timeInSecond: Long) {
|
||||
if (null == serverOrdersFragmentWR || serverOrdersFragmentWR!!.get() == null) return
|
||||
serverOrdersFragmentWR!!.get()!!.onCurrentOrderDistToEndChanged(meters, timeInSecond)
|
||||
}
|
||||
|
||||
private fun testRouteInfoUpload() {
|
||||
TPRouteDataTestUtils.converToRouteData()
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ package com.mogo.och.taxi.ui
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
@@ -155,6 +157,12 @@ class TaxiServerOrdersFragment : BaseFragment(){
|
||||
beingTaskFragment!!.onNaviToEndAmap(isShow)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun onCurrentOrderDistToEndChanged(meters: Long, timeInSecond: Long) {
|
||||
if (null == beingTaskFragment) return
|
||||
beingTaskFragment!!.updateDistanceAndTime(meters, timeInSecond)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "TaxiServerOrdersFragment"
|
||||
fun newInstance(): TaxiServerOrdersFragment {
|
||||
|
||||
@@ -21,7 +21,7 @@ sealed class TaskAndOrderUiState {
|
||||
data class TASKANDORDER(val model: QueryCurrentTaskRespBean.Result?) : TaskAndOrderUiState()//演练任务、接驾、送驾任务
|
||||
|
||||
data class UNTRUTHTASK(val untruthTask: StartServiceRespBean.Result?) : TaskAndOrderUiState()//伪任务
|
||||
data class ORDERCANCEL(var isCancel: Boolean) : TaskAndOrderUiState()//伪任务
|
||||
data class ORDERCANCEL(var isCancel: Boolean) : TaskAndOrderUiState()//取消订单
|
||||
}
|
||||
|
||||
data class UnmannedState(val taskAndOrderUiState: TaskAndOrderUiState) : IUiState
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:src="@drawable/taxi_navi_icon"
|
||||
app:layout_goneMarginEnd="@dimen/dp_40"
|
||||
app:layout_constraintRight_toRightOf="@+id/cancelOrder"
|
||||
app:layout_constraintTop_toTopOf="@+id/startStationName"
|
||||
app:layout_constraintBottom_toBottomOf="@id/startStationName"/>
|
||||
@@ -103,6 +104,7 @@
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:src="@drawable/taxi_navi_icon"
|
||||
app:layout_goneMarginEnd="@dimen/dp_40"
|
||||
app:layout_constraintRight_toRightOf="@+id/cancelOrder"
|
||||
app:layout_constraintTop_toTopOf="@+id/endStationName"
|
||||
app:layout_constraintBottom_toBottomOf="@id/endStationName"/>
|
||||
|
||||
Reference in New Issue
Block a user