[2.13.0-arch_opt] sweep add map view
This commit is contained in:
@@ -51,10 +51,11 @@ dependencies {
|
||||
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.sweeper;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -8,10 +7,6 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.sweeper.constant.SweeperConst;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
@@ -19,8 +14,6 @@ import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 清扫车业务实现入口
|
||||
*
|
||||
@@ -35,19 +28,8 @@ public class SweeperProvider implements IMogoOCH {
|
||||
private int containerId;
|
||||
private FragmentActivity activity;
|
||||
|
||||
/**
|
||||
* 进入鹰眼模式,设置手势缩放地图失效
|
||||
*/
|
||||
private void stepIntoVrMode(){
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "进入vr模式" );
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController())
|
||||
.stepInVrMode(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener("OchSweeper"
|
||||
, StatusDescriptor.VR_MODE, statusChangedListener);
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
@@ -69,22 +51,6 @@ public class SweeperProvider implements IMogoOCH {
|
||||
|
||||
}
|
||||
|
||||
private final IMogoStatusChangedListener statusChangedListener = (descriptor, isTrue) -> {
|
||||
if (descriptor == StatusDescriptor.VR_MODE) {
|
||||
// 进入vr模式默认显示网约车小巴fragment
|
||||
if (isTrue) {
|
||||
showFragment();
|
||||
} else {
|
||||
hideFragment();
|
||||
}
|
||||
} else if (MogoStatusManager.getInstance().isVrMode()) {
|
||||
// topView进行展示时推出网约车界面,但是不隐藏整个fragment
|
||||
if (sweeperFragment != null && isTrue) {
|
||||
sweeperFragment.hideOchSweeper();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void createCoverage(FragmentActivity activity, int containerId) {
|
||||
|
||||
@@ -99,11 +65,9 @@ public class SweeperProvider implements IMogoOCH {
|
||||
@Nullable
|
||||
@Override
|
||||
public Fragment createCoverage(@Nullable FragmentActivity fragmentActivity, @Nullable Integer integer) {
|
||||
|
||||
this.containerId = integer;
|
||||
this.activity = fragmentActivity;
|
||||
|
||||
// UiThreadHandler.postDelayed(this::stepIntoVrMode, 5_000L );
|
||||
showFragment();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import static com.mogo.och.sweeper.constant.SweeperConst.TIMER_START_AUTOPILOT_I
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
@@ -31,6 +32,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.view.MapBizView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -71,6 +73,7 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
|
||||
protected RelativeLayout mAICollectBtn;
|
||||
public boolean isOperationStatus;//false-收车,true-出车
|
||||
private FrameLayout flStationPanelContainer;
|
||||
private MapBizView mapBizView;
|
||||
private Group groupTestPanel;
|
||||
private FrameLayout flSpeed;
|
||||
// private BusArcView mouduleArc;
|
||||
@@ -105,6 +108,7 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mapBizView = findViewById(R.id.mapBizView);
|
||||
groupTestPanel = findViewById(R.id.groupTestPanel);
|
||||
slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
|
||||
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
|
||||
@@ -235,17 +239,41 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState) {
|
||||
super.initViews(savedInstanceState);
|
||||
mapBizView.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mapBizView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mapBizView.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
mapBizView.onLowMemory();
|
||||
}
|
||||
|
||||
private void debugArrivedRoute() {
|
||||
BDRouteDataTestUtils.converToRouteData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
mapBizView.onDestroy();
|
||||
super.onDestroyView();
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAutopilotRecordResult(@Nullable RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
// if (!HmiBuildConfig.isShowBadCaseView && recordPanel != null && recordPanel.getType() == 1 && recordPanel.getStat() == 100) {
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_72">
|
||||
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_speed"
|
||||
android:layout_width="@dimen/dp_616"
|
||||
@@ -33,7 +38,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--刹车、转向-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.SteeringBrakeView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user