[5.2.8]
[charter_p] [乘客屏 处理点击事件]
This commit is contained in:
@@ -163,12 +163,8 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
|
||||
}
|
||||
aciv_map_2_default.setOnClickListener {
|
||||
omvOverMap.displayCustomOverView()
|
||||
val controller = getMapUIController()
|
||||
if (controller != null) {
|
||||
//切换到地图中间
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
// 切换缩放到中视角
|
||||
controller.changeZoom2(0.8f)
|
||||
mapBizView.getUI()?.let {
|
||||
it.changeMapVisualAngle(it.getVrAngleDefaultMode(), null)
|
||||
}
|
||||
}
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG, this)
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.mogo.och.charter.passenger.ui.map
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.view.MapBizView
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
|
||||
import com.mogo.och.charter.passenger.R
|
||||
|
||||
class BizMapView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private lateinit var mapBizView: MapBizView
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.charter_p_bizmap, this, true)
|
||||
mapBizView = findViewById(R.id.bizMapView)
|
||||
}
|
||||
|
||||
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
fun getUI(): IMogoMapUIController? {
|
||||
return mapBizView.getUI()
|
||||
}
|
||||
|
||||
fun onCreate(bundle: Bundle?) {
|
||||
mapBizView.onCreate(bundle)
|
||||
}
|
||||
fun onResume() {
|
||||
mapBizView.onResume()
|
||||
}
|
||||
|
||||
fun onSaveInstanceState(outState: Bundle){
|
||||
mapBizView.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
fun onLowMemory() {
|
||||
mapBizView.onLowMemory()
|
||||
}
|
||||
|
||||
fun onPause() {
|
||||
mapBizView.onPause()
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
mapBizView.onDestroy()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:parentTag="FrameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/bizMapView"
|
||||
app:styleMode="MAP_STYLE_DAY_VR"
|
||||
app:isWeatherEnable="false"
|
||||
app:locationIcon3DRes="@raw/m1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</merge>
|
||||
@@ -4,13 +4,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
<com.mogo.och.charter.passenger.ui.map.BizMapView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="0dp"
|
||||
app:layout_constraintWidth_percent="0.6045"
|
||||
app:styleMode="MAP_STYLE_DAY_VR"
|
||||
app:isWeatherEnable="false"
|
||||
app:locationIcon3DRes="@raw/m1"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user