Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into dev_robotaxi-d-app-module_290_220715_2.9.0_interface_subscribe
This commit is contained in:
@@ -107,7 +107,7 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
StatusManager.show(container)
|
||||
}
|
||||
|
||||
override fun hideStatusBar(container: ViewGroup) {
|
||||
StatusManager.hide(container)
|
||||
override fun hideStatusBar() {
|
||||
StatusManager.hide()
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import com.zhjt.mogo_core_function_devatools.status.ui.StatusView
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.flow.*
|
||||
import mogo_msg.MogoReportMsg
|
||||
import java.lang.ref.*
|
||||
import java.util.concurrent.*
|
||||
|
||||
|
||||
@@ -43,6 +44,7 @@ object StatusManager {
|
||||
private var timer: Job? = null
|
||||
private var hasInit = false
|
||||
private val listeners by lazy { CopyOnWriteArrayList<IStatusListener>() }
|
||||
private var container: WeakReference<ViewGroup>? = null
|
||||
|
||||
private val listener = object : IMoGoAutopilotStatusListener {
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
@@ -152,15 +154,15 @@ object StatusManager {
|
||||
}
|
||||
return
|
||||
}
|
||||
this.container = WeakReference(container)
|
||||
val child = StatusView(model, container.context)
|
||||
container.addView(child, ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT))
|
||||
}
|
||||
|
||||
fun hide(container: ViewGroup) {
|
||||
container.visibility = View.GONE
|
||||
fun hide() {
|
||||
container?.get()?.takeIf { it.visibility == View.VISIBLE }?.run { visibility = View.GONE }
|
||||
}
|
||||
|
||||
|
||||
private fun onDestroy(ctx: Context) {
|
||||
hasInit = false
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
@@ -1214,7 +1214,6 @@ import java.util.*
|
||||
}
|
||||
|
||||
override fun showSmallFragment() {
|
||||
CallerDevaToolsManager.hideStatusBar(statusBarContainer)
|
||||
// 加载全览模式图层
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
@@ -1226,16 +1225,20 @@ import java.util.*
|
||||
show(fragmentOverview)
|
||||
}.commitAllowingStateLoss()
|
||||
}
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
override fun hideSmallFragment() {
|
||||
context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
activity?.supportFragmentManager?.beginTransaction()
|
||||
?.setCustomAnimations(R.anim.slide_in, R.anim.fade_out)
|
||||
?.hide(fragmentOverview)
|
||||
?.setCustomAnimations(R.anim.slide_in, R.anim.fade_out)?.apply {
|
||||
if (fragmentOverview.isVisible) {
|
||||
hide(fragmentOverview)
|
||||
}
|
||||
}
|
||||
?.commitAllowingStateLoss()
|
||||
context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -17,7 +17,7 @@ import androidx.annotation.Nullable;
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.CameraUpdate;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.MapView;
|
||||
import com.amap.api.maps.TextureMapView;
|
||||
import com.amap.api.maps.UiSettings;
|
||||
import com.amap.api.maps.model.BitmapDescriptor;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
@@ -65,7 +65,7 @@ public class AMapCustomView
|
||||
extends RelativeLayout
|
||||
implements IMoGoMapLocationListener {
|
||||
public static final String TAG = "AMapCustomView";
|
||||
private MapView mAMapView;
|
||||
private TextureMapView mAMapView;
|
||||
private AMap mAMap;
|
||||
private int zoomLevel = 15;
|
||||
private CameraUpdate mCameraUpdate;
|
||||
|
||||
@@ -67,7 +67,6 @@ object MarkerDrawerManager {
|
||||
private fun loopRouteAndWipe(routePoints: List<LatLng>?, lon: Double, lat: Double) {
|
||||
if (routePoints != null && routePoints.isNotEmpty()) {
|
||||
val arrivedIndex: Int = getArrivedPointIndex(routePoints, lon, lat)
|
||||
Log.d("cff", "thread is:${Thread.currentThread().name},arrivedIndex is:$arrivedIndex")
|
||||
if (arrivedIndex != -1 && lastArrivedIndex != arrivedIndex) {
|
||||
callback?.onLocationChanged(routePoints, arrivedIndex)
|
||||
lastArrivedIndex = arrivedIndex
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<com.amap.api.maps.MapView
|
||||
<com.amap.api.maps.TextureMapView
|
||||
android:id="@+id/aMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overLayer"
|
||||
|
||||
Reference in New Issue
Block a user