opt
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package com.zhidao.mogo.module.left.panel.presenter
|
||||
|
||||
import android.location.Location
|
||||
import android.os.Handler
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.map.MogoLatLng
|
||||
import com.mogo.map.location.IMogoLocationListener
|
||||
import com.mogo.map.location.MogoLocation
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.zhidao.mogo.module.left.panel.LeftPanelConst.MODULE_NAME
|
||||
@@ -25,8 +28,22 @@ class SimpleSpeedPresenter(view: SimpleSpeedFragment) : Presenter<SimpleSpeedFra
|
||||
// 注册相关回调,监测速度变化
|
||||
mogoApis.registerCenterApi.registerMogoLocationListener(MODULE_NAME) {
|
||||
handler.post {
|
||||
mView.refreshSpeed(it.speed.toInt())
|
||||
mView.refreshSpeed((it.speed * 3.6).toInt())
|
||||
}
|
||||
}
|
||||
|
||||
// mogoApis.registerCenterApi.registerCarLocationChangedListener(MODULE_NAME,object : IMogoCarLocationChangedListener2{
|
||||
// override fun onCarLocationChanged2(latLng: Location?) {
|
||||
// latLng?.let {
|
||||
// handler.post {
|
||||
// mView.refreshSpeed(it.speed.toInt())
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// override fun onCarLocationChanged(latLng: MogoLatLng?) {
|
||||
// }
|
||||
//
|
||||
// })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user