[bus]
[结构和车模修改]
This commit is contained in:
yangyakun
2023-12-28 13:59:51 +08:00
parent d33c49f645
commit 5aa0b1efbd
18 changed files with 98 additions and 114 deletions

View File

@@ -43,6 +43,7 @@ import com.mogo.och.bus.R;
import com.mogo.och.bus.bean.BusRoutesResult;
import com.mogo.och.bus.model.OrderModel;
import com.mogo.och.bus.util.BDRouteDataTestUtils;
import com.mogo.och.bus.view.BizMapView;
import com.mogo.och.bus.view.SlidePanelView;
import com.mogo.och.common.module.utils.SoundPoolHelper;
@@ -71,7 +72,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
protected RelativeLayout mSettingBtn;
protected RelativeLayout mBadcaseBtn;
private FrameLayout flStationPanelContainer;
private MapBizView mapBizView;
private BizMapView mapBizView;
private Group groupTestPanel;
private TrafficDataView mTrafficDataView;
// private BusTrafficLightView mTrafficLightView;

View File

@@ -0,0 +1,59 @@
package com.mogo.och.bus.view
import android.content.Context
import android.os.Bundle
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.view.MapBizView
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.map.uicontroller.IMogoMapUIController
import com.mogo.och.bus.R
class BizMapView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
private lateinit var mapBizView: MapBizView
init {
if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) {
LayoutInflater.from(context).inflate(R.layout.bus_m2_bizmap_map, this, true)
}else if(AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)){
LayoutInflater.from(context).inflate(R.layout.bus_jl_bizmap_map, this, true)
}else{
LayoutInflater.from(context).inflate(R.layout.bus_jl_bizmap_map, this, true)
}
mapBizView = findViewById(R.id.bizMapView)
}
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()
}
}

View File

@@ -6,10 +6,8 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_72">
<com.mogo.eagle.core.function.view.MapBizView
<com.mogo.och.bus.view.BizMapView
android:id="@+id/mapBizView"
app:isWeatherEnable="false"
app:locationIcon3DRes="@raw/xiaoba"
android:layout_width="match_parent"
android:layout_height="match_parent" />

View File

@@ -0,0 +1,14 @@
<?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:isWeatherEnable="false"
app:locationIcon3DRes="@raw/xiaoba"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</merge>

View File

@@ -0,0 +1,14 @@
<?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:isWeatherEnable="false"
app:locationIcon3DRes="@raw/m2"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</merge>