Merge branch 'release_robotaxi-d-app-module_2132_221223_2.13.2.1' into 'master'
Release robotaxi d app module 2132 221223 2.13.2.1 See merge request zhjt/AndroidApp/MoGoEagleEye!510
This commit is contained in:
@@ -27,6 +27,7 @@ import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -34,8 +35,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
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.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -56,6 +58,8 @@ import com.mogo.och.common.module.utils.SoundPoolHelper;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
@@ -137,20 +141,22 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, BusConst.TYPE_MARKER_BUS_ORDER);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
@@ -520,6 +521,8 @@ public class BusOrderModel {
|
||||
stationList, arrivingOrArrivedStationIndex, false);
|
||||
}
|
||||
updateAutopilotControlParameters();
|
||||
|
||||
CallerSmpManager.startQueryV2XEvents(); //选择路线后开启
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -26,11 +27,13 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
|
||||
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -63,6 +66,7 @@ import com.mogo.och.taxi.passenger.callback.ITaxiPassengerVeloctityCallback;
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst;
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerOrderStatusEnum;
|
||||
import com.mogo.och.taxi.passenger.network.TaxiPassengerServiceManager;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
|
||||
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -248,6 +252,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
|
||||
CallerMsgBoxEventListenerManager.INSTANCE.addListener(TAG,iMsgBoxEventListener);
|
||||
}
|
||||
|
||||
private void releaseListeners() {
|
||||
@@ -266,6 +272,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
|
||||
CallerMsgBoxEventListenerManager.INSTANCE.removeListener(iMsgBoxEventListener);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -602,6 +610,17 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
};
|
||||
|
||||
private final IMsgBoxEventListener iMsgBoxEventListener = new IMsgBoxEventListener() {
|
||||
@Override
|
||||
public void onSummaryClickEvent() {
|
||||
if (mCurrentOCHOrder == null){
|
||||
ToastUtils.showLong("行程已结束");
|
||||
}else {
|
||||
OverlayLeftViewUtils.INSTANCE.transmissionIndexGet(OverlayLeftViewUtils.OVERVIEW);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void startToRouteAndWipe(List<MessagePad.Location> models) {
|
||||
List<MogoLocation> locationsModels = CoordinateCalculateRouteUtil
|
||||
.coordinateConverterWgsToGcjLocations(mContext,models);
|
||||
|
||||
@@ -198,7 +198,6 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
mView.showOrHideServingOrderFragment(true,true);
|
||||
});
|
||||
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotLoop(false);
|
||||
CallerSmpManager.startQueryV2XEvents();//全览模式的V2X事件轮询开始
|
||||
}
|
||||
// 30 用户到达上车点 并通过了手机号后四位验证
|
||||
// 40 服务中
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -99,6 +100,7 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
TaxiPassengerModel.getInstance().queryOrderRouteList();
|
||||
}
|
||||
TaxiPassengerModel.getInstance().updateAutopilotControlParameters();
|
||||
CallerSmpManager.startQueryV2XEvents();//全览模式的V2X事件轮询开始
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "OnTheWayToEnd");
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,15 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy;
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
@@ -28,16 +31,17 @@ import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.callback.ITPClickStartAutopilotCallback;
|
||||
import com.mogo.och.taxi.passenger.event.UIStatus;
|
||||
import com.mogo.och.taxi.passenger.mulprocess.EmptyService;
|
||||
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter;
|
||||
import com.mogo.och.taxi.passenger.ui.comment.TaxiPassengerArrivedView;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
|
||||
import com.mogo.och.taxi.passenger.mulprocess.EmptyService;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -109,34 +113,37 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
return new TaxiPassengerV2XNotificationView(getContext());
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
private void updateSwitchMapIcon() {
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}else {
|
||||
} else {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
private void initListener(){
|
||||
|
||||
private void initListener() {
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//视角切换
|
||||
if (MogoMapUIController.getInstance()
|
||||
.getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0 去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0 去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
@@ -145,7 +152,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
});
|
||||
}
|
||||
|
||||
private void initArrivedView(){
|
||||
private void initArrivedView() {
|
||||
mArrivedEndView = new WeakReference<>(new TaxiPassengerArrivedView(getContext()));
|
||||
mArrivedEndView.get().setITaxiPassengerScoreCallback((taxiPassengerScoreUpdateOrderReqBean) -> getPresenter().arrivedAndScore(taxiPassengerScoreUpdateOrderReqBean));
|
||||
}
|
||||
@@ -173,9 +180,10 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
|
||||
/**
|
||||
* VR mode 转换
|
||||
*
|
||||
* @param isVRMode
|
||||
*/
|
||||
public void switchVRFlatMode(boolean isVRMode){
|
||||
public void switchVRFlatMode(boolean isVRMode) {
|
||||
if (mRootView != null) {
|
||||
mRootView.setVisibility(isVRMode ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
@@ -187,6 +195,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private int mPrevAPStatus = -1;
|
||||
|
||||
public void onAutopilotStatusChanged(int status) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status) {
|
||||
@@ -199,7 +208,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
onAutopilotStatusSuccessDone();
|
||||
}
|
||||
// 3. 其他过程直接更新
|
||||
if (mPrevAPStatus != status){
|
||||
if (mPrevAPStatus != status) {
|
||||
autopilotStatusAnimchanged(status);
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
@@ -210,7 +219,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
// mAutopilotTv.setText(isInAutopilot?"自动驾驶":"开启自动驾驶");
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_auto_nor);
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
} else {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
@@ -240,20 +249,21 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
removeListener();
|
||||
}
|
||||
|
||||
private void removeListener(){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
private void removeListener() {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(null);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void changeOverview(UIStatus uiStatus){
|
||||
if(uiStatus.status==UIStatus.LIVE){
|
||||
public void changeOverview(UIStatus uiStatus) {
|
||||
if (uiStatus.status == UIStatus.LIVE) {
|
||||
CallerHmiManager.INSTANCE.hideSmallFragment();
|
||||
showOrHideServingOrderFragment(true,false);
|
||||
}else if(uiStatus.status==UIStatus.OVERVIEW){
|
||||
showOrHideServingOrderFragment(true, false);
|
||||
} else if (uiStatus.status == UIStatus.OVERVIEW) {
|
||||
CallerHmiManager.INSTANCE.showSmallFragment();
|
||||
showOrHideServingOrderFragment(false,false);
|
||||
showOrHideServingOrderFragment(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,25 +274,26 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
|
||||
/**
|
||||
* 显示或隐藏订单信息
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
public void showOrHideServingOrderFragment(boolean isShow,boolean showOrHideLefeMenu){
|
||||
public void showOrHideServingOrderFragment(boolean isShow, boolean showOrHideLefeMenu) {
|
||||
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
if (isShow){
|
||||
if (ochServingOrderFragment == null){
|
||||
if (isShow) {
|
||||
if (ochServingOrderFragment == null) {
|
||||
ochServingOrderFragment = new TaxiPassengerServingOrderFragment().newInstance();
|
||||
}
|
||||
if(showOrHideLefeMenu) {
|
||||
if (showOrHideLefeMenu) {
|
||||
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true);
|
||||
}
|
||||
if (ochServingOrderFragment.isHidden()){
|
||||
if (ochServingOrderFragment.isHidden()) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
return;
|
||||
}
|
||||
if (ochServingOrderFragment.isAdded()){
|
||||
if (ochServingOrderFragment.isAdded()) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
@@ -293,13 +304,13 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.add(R.id.module_mogo_och_navi_panel_container, ochServingOrderFragment)
|
||||
.show(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
|
||||
}else {
|
||||
if (ochServingOrderFragment != null){
|
||||
} else {
|
||||
if (ochServingOrderFragment != null) {
|
||||
transaction
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE)
|
||||
.hide(ochServingOrderFragment).commitAllowingStateLoss();
|
||||
}
|
||||
if(showOrHideLefeMenu) {
|
||||
if (showOrHideLefeMenu) {
|
||||
OverlayLeftViewUtils.INSTANCE.dismissOverlayView(true);
|
||||
CallerHmiManager.INSTANCE.hideSmallFragment();
|
||||
}
|
||||
@@ -311,18 +322,19 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* 乘客验证成功,页面显示,按钮置于不可点击
|
||||
* 司机端确认可点击开启自动驾驶, 按钮置为可点击
|
||||
* 订单前往目的地,页面消失
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
public void showOrHideStartAutopilotView(boolean isShow, boolean isClickable){
|
||||
if (isShow){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void showOrHideStartAutopilotView(boolean isShow, boolean isClickable) {
|
||||
if (isShow) {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
mStartAutopilotView = new WeakReference<>(new TaxiPassengerStartAutopilotView(getContext()));
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(this);
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mStartAutopilotView.get());
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mStartAutopilotView.get());
|
||||
updateStartAutopilotBtnStatus(isClickable);
|
||||
}else {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
} else {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().setOnClickStartAutopilotBtnCallback(null);
|
||||
@@ -331,15 +343,15 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
public void updateStartAutopilotBtnStatus(boolean isClickable){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void updateStartAutopilotBtnStatus(boolean isClickable) {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().handleStartAutopilotBtnStatus(isClickable);
|
||||
}
|
||||
|
||||
public void onAutopilotStatusSuccessDone(){
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null){
|
||||
public void onAutopilotStatusSuccessDone() {
|
||||
if (mStartAutopilotView == null || mStartAutopilotView.get() == null) {
|
||||
return;
|
||||
}
|
||||
mStartAutopilotView.get().onAutopilotStatusSuccess();
|
||||
@@ -351,36 +363,38 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
* ② 到达上车点 隐藏到达终点的页面(上一个订单没有评价)
|
||||
* ③ 到达目的地 显示到达终点的页面
|
||||
* ④ debug 使用
|
||||
* @param isShow true 展示 false 隐藏
|
||||
*
|
||||
* @param isShow true 展示 false 隐藏
|
||||
* @param arrivedEndStation 目的地
|
||||
* @param orderNo 订单No
|
||||
* @param orderNo 订单No
|
||||
*/
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation,String orderNo){
|
||||
if (isShow){
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
public void showOrHideArrivedEndLayout(boolean isShow, String arrivedEndStation, String orderNo) {
|
||||
if (isShow) {
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
initArrivedView();
|
||||
}
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get(),R.style.och_window_anim_alpha);
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mArrivedEndView.get(), R.style.och_window_anim_alpha);
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation,orderNo);
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation, orderNo);
|
||||
}
|
||||
//如果在全屏 回收需要300毫秒 后期优化使用单独的播放器
|
||||
},500);
|
||||
}else {
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
}, 500);
|
||||
} else {
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
return;
|
||||
}
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedEndView.get());
|
||||
}
|
||||
}
|
||||
|
||||
// 20 司机到达上车点
|
||||
public void preOrderThankPageTenlogic(String startSiteAddr,
|
||||
String endSiteAddr,
|
||||
String passengerNum,
|
||||
String carNumber,
|
||||
String phone){
|
||||
String phone) {
|
||||
showOrHideArrivedEndLayout(false, "", "");
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
@@ -399,33 +413,34 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
String phone) {
|
||||
try {
|
||||
if (isShow) {
|
||||
if(mArrivedCheckView==null||mArrivedCheckView.get()==null){
|
||||
if (mArrivedCheckView == null || mArrivedCheckView.get() == null) {
|
||||
initCheckView();
|
||||
}
|
||||
mArrivedCheckView.get().setData(startSiteAddr, endSiteAddr, passengerNum, carNumber,phone);
|
||||
mArrivedCheckView.get().setData(startSiteAddr, endSiteAddr, passengerNum, carNumber, phone);
|
||||
OverlayViewUtils.showOverlayView(getActivity(), mArrivedCheckView.get());
|
||||
} else {
|
||||
if(mArrivedCheckView==null||mArrivedCheckView.get()==null){
|
||||
if (mArrivedCheckView == null || mArrivedCheckView.get() == null) {
|
||||
return;
|
||||
}
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedCheckView.get());
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户评分后接口回调
|
||||
* 用户评分后接口回调
|
||||
*
|
||||
* @param isSuccess true 打分成功 false 打分失败
|
||||
*/
|
||||
public void showArrivedEndLayout2Thank(boolean isSuccess) {
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
if (mArrivedEndView == null || mArrivedEndView.get() == null) {
|
||||
initArrivedView();
|
||||
}
|
||||
if(isSuccess){
|
||||
if (isSuccess) {
|
||||
mArrivedEndView.get().scoreSuccess();
|
||||
}else {
|
||||
} else {
|
||||
mArrivedEndView.get().scoreFail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -829,6 +830,7 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
updateAutopilotControlParameters();
|
||||
CallerSmpManager.startQueryV2XEvents();
|
||||
}
|
||||
if (mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.getCode()){
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -31,7 +32,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
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.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -43,6 +46,7 @@ import com.mogo.och.common.module.utils.AnimatorDrawableUtil;
|
||||
import com.mogo.och.taxi.R;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
@@ -174,20 +178,22 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
//视角切换
|
||||
long start = SystemClock.elapsedRealtime();
|
||||
try {
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS, TaxiConst.TYPE_MARKER_TAXI_ORDER);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else {
|
||||
// 2.11.0去掉
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@ if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'apm-plugin'
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
// apply plugin: 'bytex.threadOpt'
|
||||
// thread_opt {
|
||||
// enable !isReleaseBuild
|
||||
// enableInDebug !isReleaseBuild
|
||||
// logLevel "DEBUG"
|
||||
// }
|
||||
//}
|
||||
if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'bytex.threadOpt'
|
||||
thread_opt {
|
||||
enable !isReleaseBuild
|
||||
enableInDebug !isReleaseBuild
|
||||
logLevel "DEBUG"
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'LancetX'
|
||||
@@ -292,7 +292,6 @@ dependencies {
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_runner
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core
|
||||
androidTestImplementation rootProject.ext.dependencies.localbroadcastmanager
|
||||
androidTestImplementation rootProject.ext.dependencies.mogo_v2x
|
||||
|
||||
// if (isAndroidTestBuild()) {
|
||||
// implementation "com.mogo.thread.opt:lib:${THREAD_OPT_VERSION}"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,10 +20,10 @@
|
||||
tools:replace="android:label">
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
android:value="5120"/>
|
||||
android:value="2560"/>
|
||||
<meta-data
|
||||
android:name="design_height_in_dp"
|
||||
android:value="3200"/>
|
||||
android:value="1600"/>
|
||||
|
||||
<provider
|
||||
android:name="com.rousetime.android_startup.provider.StartupProvider"
|
||||
|
||||
@@ -24,6 +24,6 @@ class APMStartup : AndroidStartup<Boolean?>() {
|
||||
}
|
||||
|
||||
override fun dependenciesByName(): List<String> {
|
||||
return listOf("com.mogo.launcher.stageone.ARouterStartUp")
|
||||
return listOf("com.mogo.launcher.stageone.ARouterStartUp", "com.mogo.launcher.stageone.ThreadOptStartup")
|
||||
}
|
||||
}
|
||||
@@ -31,4 +31,8 @@ class ARouterStartUp : AndroidStartup<String>() {
|
||||
}
|
||||
|
||||
override fun waitOnMainThread() = false
|
||||
|
||||
override fun dependenciesByName(): List<String>? {
|
||||
return listOf("com.mogo.launcher.stageone.ThreadOptStartup")
|
||||
}
|
||||
}
|
||||
@@ -105,4 +105,8 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun dependenciesByName(): List<String> {
|
||||
return listOf("com.mogo.launcher.stageone.ThreadOptStartup")
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,8 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
override fun dependenciesByName(): List<String> {
|
||||
return listOf(
|
||||
"com.mogo.launcher.stageone.APMStartup",
|
||||
"com.mogo.launcher.stageone.ConfigStartUp"
|
||||
"com.mogo.launcher.stageone.ConfigStartUp",
|
||||
"com.mogo.launcher.stageone.ThreadOptStartup"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -367,5 +368,4 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
.init(context, DebugConfig.getSocketAppId(), lat, lon)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.launcher.stageone
|
||||
|
||||
import android.content.*
|
||||
import com.mogo.thread.ext.core.*
|
||||
import com.mogo.thread.ext.core.config.*
|
||||
import com.rousetime.android_startup.*
|
||||
import java.io.*
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit.SECONDS
|
||||
|
||||
class ThreadOptStartup: AndroidStartup<Boolean>() {
|
||||
|
||||
override fun create(context: Context): Boolean {
|
||||
ThreadManager
|
||||
.init(ThreadConfig.Builder()
|
||||
.maxKeepAliveTime(5, SECONDS)
|
||||
/*.dump(DumpConfig.Builder()
|
||||
.dumpLogFilePath(File(context.getExternalFilesDir(null), "thread_dump_log_${ SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.ROOT).format(Date()) }.txt").absolutePath)
|
||||
.dumpPeriod(5, SECONDS)
|
||||
.threadRunThreshold(10, SECONDS)
|
||||
.build())*/)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun callCreateOnMainThread(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun waitOnMainThread(): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuWarningData;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
@@ -117,6 +118,7 @@ public class DataDistribution {
|
||||
public final List<String> listOriginalPointCloud = new ArrayList<>();
|
||||
public final List<String> listPlanningObjects = new ArrayList<>();
|
||||
public final List<String> listPlanningDecisionState = new ArrayList<>();
|
||||
public final List<String> listObuWarningData = new ArrayList<>();
|
||||
|
||||
public String cutDown(String str) {
|
||||
if (isCutDown && str.length() > 650) {
|
||||
@@ -168,6 +170,14 @@ public class DataDistribution {
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuWarningData) {
|
||||
listObuWarningData.add(0, time + str);
|
||||
if (listObuWarningData.size() > LIST_SIZE) {
|
||||
listObuWarningData.remove(listObuWarningData.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_WARNING_DATA.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof GnssInfo) {
|
||||
listGnssInfo.add(0, time + str);
|
||||
if (listGnssInfo.size() > LIST_SIZE) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
|
||||
public class ObuWarningData extends BaseInfo {
|
||||
public final ObuWarningEvent.ObuWarningData bean;
|
||||
|
||||
public ObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -117,6 +117,8 @@ public class InfoFragment extends BaseFragment {
|
||||
adapter.setData(DataDistribution.getInstance().listArrivalNotification);
|
||||
} else if (Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(title)) {
|
||||
adapter.setData(DataDistribution.getInstance().listStatusInfo);
|
||||
} else if (Constants.TITLE.RECEIVE_OBU_WARNING_DATA.equals(title)) {
|
||||
adapter.setData(DataDistribution.getInstance().listObuWarningData);
|
||||
} else if (Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(title)) {
|
||||
adapter.setData(DataDistribution.getInstance().listRecordDataConfig);
|
||||
} else if (Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(title)) {
|
||||
|
||||
@@ -64,6 +64,7 @@ import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuWarningData;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
@@ -116,6 +117,7 @@ import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
@@ -642,6 +644,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_STATUS_QUERY_RESP);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_OBU_WARNING_DATA);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_WARN);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_ERROR);
|
||||
|
||||
@@ -1016,6 +1019,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData) {
|
||||
ObuWarningData base = new ObuWarningData(header, obuWarningData, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
|
||||
@@ -168,6 +168,7 @@ public class Constants {
|
||||
String RECEIVE_WARN = MessageType.TYPE_RECEIVE_WARN.desc;
|
||||
String RECEIVE_ARRIVAL_NOTIFICATION = MessageType.TYPE_RECEIVE_ARRIVAL_NOTIFICATION.desc;
|
||||
String RECEIVE_STATUS_QUERY_RESP = MessageType.TYPE_RECEIVE_STATUS_QUERY_RESP.desc;
|
||||
String RECEIVE_OBU_WARNING_DATA = MessageType.TYPE_RECEIVE_OBU_WARNING_DATA.desc;
|
||||
String RECEIVE_ERROR = "错误数据";
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ import java.util.TimerTask;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
@@ -538,6 +539,10 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData) {
|
||||
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
|
||||
@@ -34,7 +34,7 @@ buildscript {
|
||||
classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"
|
||||
classpath "com.mogo.cloud:bizconfig:${BIZCONFIG_VERSION}"
|
||||
classpath 'com.volcengine:apm_insight_plugin:1.4.1'
|
||||
// classpath "com.mogo.thread.opt:plg:${THREAD_OPT_VERSION}"
|
||||
classpath "com.mogo.thread.opt:plg:${THREAD_OPT_VERSION}"
|
||||
classpath 'com.mogo.cloud:systrace:1.0.1'
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
|
||||
classpath 'com.mogo.sticky:service:1.0.8'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
ext {
|
||||
time = ""
|
||||
kotlin_version = "1.4.31"
|
||||
// kotlin_version = "1.4.31"
|
||||
kotlin_version = "1.5.0"
|
||||
dependencies = [
|
||||
// androidx
|
||||
androidxappcompat : "androidx.appcompat:appcompat:1.3.1",
|
||||
@@ -201,8 +202,6 @@ ext {
|
||||
mogo_core_utils : "com.mogo.eagle.core:utils:${MOGO_CORE_UTILS_VERSION}",
|
||||
mogo_core_network : "com.mogo.eagle.core:network:${MOGO_CORE_NETWORK_VERSION}",
|
||||
|
||||
//========================= V2X SDK =========================
|
||||
mogo_v2x : "com.mogo.v2x:v2x:${MOGO_V2X_SDK_VERSION}",
|
||||
|
||||
life_cycle_scope : "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0",
|
||||
view_model_scope : "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0",
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsList
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
@@ -62,6 +63,7 @@ import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
import mogo_msg.MogoReportMsg
|
||||
import perception.TrafficLightOuterClass
|
||||
import prediction.Prediction
|
||||
@@ -99,14 +101,14 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
|
||||
//感知物体
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
// @ChainLog(
|
||||
// linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
// linkCode = CHAIN_LINK_ADAS,
|
||||
// endpoint = PAD,
|
||||
// nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
// paramIndexes = [0, 1],
|
||||
// clientPkFileName = "sn"
|
||||
// )
|
||||
override fun onTrackedObjects(
|
||||
header: MessagePad.Header,
|
||||
trackedObjects: MessagePad.TrackedObjects
|
||||
@@ -441,7 +443,15 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* OBU预警事件
|
||||
*
|
||||
* @param header 头
|
||||
* @param obuWarningData 数据
|
||||
*/
|
||||
override fun onObuWarningData(header: MessagePad.Header?, obuWarningData: ObuWarningEvent.ObuWarningData?) {
|
||||
CallerObuDcCombineListenerManager.invokeObuDcData(obuWarningData)
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可以启动自动驾驶
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
android:id="@+id/module_carchatting_call_head"
|
||||
android:layout_width="@dimen/module_call_chat_calling_iv_hawk_eye_width_height"
|
||||
android:layout_height="@dimen/module_call_chat_calling_iv_hawk_eye_width_height"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_carchatting_hawk_eye_default_head_img"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -25,7 +24,6 @@
|
||||
android:layout_width="@dimen/module_call_chat_hawk_eye_circle_btn_size"
|
||||
android:layout_height="@dimen/module_call_chat_hawk_eye_circle_btn_size"
|
||||
android:layout_marginEnd="@dimen/module_call_chat_calling_iv_hawk_eye_margin_left_right"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_carchatting_launcher_calling_hangup"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
android:id="@+id/module_carchatting_call_head"
|
||||
android:layout_width="@dimen/module_call_chat_incoming_aisdk_tag_width"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/module_carchatting_aicloud_incoming"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -26,7 +25,6 @@
|
||||
android:layout_marginEnd="@dimen/module_call_chat_calling_iv_hawk_eye_margin_left_right"
|
||||
android:layout_marginRight="@dimen/module_call_chat_state_incoming_hawk_eye_call_margin_right"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_callchatting_launcher_incoming_answer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/module_carchatting_incoming_hangUp"
|
||||
@@ -39,7 +37,6 @@
|
||||
android:layout_height="@dimen/module_call_chat_hawk_eye_incoming_circle_btn_size"
|
||||
android:layout_marginEnd="@dimen/module_call_chat_calling_iv_hawk_eye_margin_left_right"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_callchatting_launcher_incoming_hangup"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -56,8 +56,8 @@ class SceneManager {
|
||||
sceneModuleTAG.map[DEVA] = SceneModule(false, M_DEVA)
|
||||
sceneModuleTAG.map[HMI] = SceneModule(false, M_HMI)
|
||||
sceneModuleTAG.map[OBU] = SceneModule(false, M_OBU)
|
||||
sceneModuleTAG.map[V2X] = SceneModule(false, M_V2X)
|
||||
sceneModuleTAG.map[MAP] = SceneModule(false, M_MAP)
|
||||
sceneModuleTAG.map[V2X] = SceneModule(true, M_V2X)
|
||||
sceneModuleTAG.map[MAP] = SceneModule(true, M_MAP)
|
||||
sceneModuleTAG.map[ROUTE] = SceneModule(true, M_OLD_ROUTE)
|
||||
sceneModuleTAG.map[NET] = SceneModule(true, M_NETWORK)
|
||||
sceneModuleTAG.map[BUS] = SceneModule(true, M_BUS)
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DISPATCH;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIRM;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL;
|
||||
@@ -161,20 +162,27 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
private void startAutoPilot() {
|
||||
AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = false;
|
||||
List<AutopilotControlParameters.AutoPilotLonLat> wayLatLon = new ArrayList<>();
|
||||
if (receiverBean != null && receiverBean.getStopsList() != null) {
|
||||
for (MogoLatLng mogoLatLng : receiverBean.getStopsList()) {
|
||||
wayLatLon.add(new AutopilotControlParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon));
|
||||
// AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
|
||||
// currentAutopilot.isSpeakVoice = false;
|
||||
// List<AutopilotControlParameters.AutoPilotLonLat> wayLatLon = new ArrayList<>();
|
||||
// if (receiverBean != null && receiverBean.getStopsList() != null) {
|
||||
// for (MogoLatLng mogoLatLng : receiverBean.getStopsList()) {
|
||||
// wayLatLon.add(new AutopilotControlParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon));
|
||||
// }
|
||||
// }
|
||||
// currentAutopilot.wayLatLons = wayLatLon;
|
||||
// currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon());
|
||||
// currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
// currentAutopilot.vehicleType = 10;
|
||||
// CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
// CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot);
|
||||
AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo();
|
||||
if (autopilotStatusInfo !=null){
|
||||
AutopilotControlParameters autopilotControlParameters = autopilotStatusInfo.getAutopilotControlParameters();
|
||||
if (autopilotControlParameters != null){
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
}
|
||||
}
|
||||
currentAutopilot.wayLatLons = wayLatLon;
|
||||
currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon());
|
||||
currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
currentAutopilot.vehicleType = 10;
|
||||
CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,16 +3,20 @@ package com.zhjt.dispatch;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
public abstract class DispatchBaseDialog extends Dialog {
|
||||
|
||||
public DispatchBaseDialog(@NonNull Context context) {
|
||||
super(context,R.style.Base_AlertDialog_AppCompat);
|
||||
super(context,R.style.BaseFloatDialogStyle);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
|
||||
} else {
|
||||
@@ -27,4 +31,22 @@ public abstract class DispatchBaseDialog extends Dialog {
|
||||
|
||||
public abstract void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent);
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
setWindowSize();
|
||||
}
|
||||
private void setWindowSize(){
|
||||
WindowManager.LayoutParams attributes = getWindow().getAttributes();
|
||||
attributes.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
attributes.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
FrameLayout content = (FrameLayout)findViewById(android.R.id.content);
|
||||
if(content!=null){
|
||||
ViewGroup rootView = (ViewGroup) content.getChildAt(0);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) rootView.getLayoutParams();
|
||||
layoutParams.gravity = Gravity.CENTER;
|
||||
rootView.setLayoutParams(layoutParams);
|
||||
}
|
||||
getWindow().setAttributes(attributes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ class V2XLimitingVelocityBroadcastReceiver : BroadcastReceiver() {
|
||||
*
|
||||
* @param limitingVelocitySpeed 限速速度
|
||||
*/
|
||||
private fun dispatchShowWaring(limitingVelocitySpeed: Int) {
|
||||
CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed)
|
||||
private fun dispatchShowWaring(limitingVelocitySpeed: Int) { // TODO
|
||||
// CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
@@ -75,8 +75,8 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
ttsContent: String?,
|
||||
tag: String?
|
||||
) {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
if (EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType == v2xType.toString()) { //TODO
|
||||
// CallerHmiManager.showLimitingVelocity(1, 4)
|
||||
}
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RTS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.data.enums.SidePattern.*
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
@@ -111,6 +111,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import mogo_msg.MogoReportMsg
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
|
||||
/**
|
||||
@@ -171,7 +172,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
private var adUpgradeDialog: AdUpgradeDialog? = null
|
||||
|
||||
private var lastSpeakJob: Job? = null
|
||||
private val lastSpeakJob by lazy { AtomicReference<Job>() }
|
||||
|
||||
private var lastShowV2XJob: Job? = null
|
||||
|
||||
@@ -470,17 +471,17 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if(show){
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
MsgBoxTipView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
MsgBoxTipView.visibility = View.GONE
|
||||
MsgBoxTipView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if(show){
|
||||
MsgBoxPTipView.visibility = View.VISIBLE
|
||||
MsgBoxPTipView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
MsgBoxPTipView.visibility = View.GONE
|
||||
MsgBoxPTipView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,7 +822,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
activity?.let {
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
?: EventTypeEnumNew.getWarningContent(v2xType)
|
||||
|
||||
//占道施工预警
|
||||
if (v2xType.equals("10006") || v2xType.equals("100061")) {
|
||||
@@ -842,7 +843,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
return
|
||||
}
|
||||
val content = mViewNotificationProvider?.getNotificationView() ?: return
|
||||
content.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType))
|
||||
content.setWarningIcon(EventTypeEnumNew.getWarningIcon(v2xType))
|
||||
content.setWarningContent(warningContent)
|
||||
CallerLogger.d(
|
||||
"$M_HMI$TAG",
|
||||
@@ -901,7 +902,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
override fun onShow(reminder: IReminder) {
|
||||
listener?.onShow()
|
||||
lastShowV2XJob?.safeCancel()
|
||||
lastSpeakJob?.safeCancel()
|
||||
lastSpeakJob.get()?.safeCancel()
|
||||
showingV2XTip = reminder
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
@@ -914,7 +915,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
lifecycleScope.launch {
|
||||
speak(it, ttsContent)
|
||||
}.also { itx ->
|
||||
lastSpeakJob = itx
|
||||
lastSpeakJob.set(itx)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -941,53 +942,60 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
playTts: Boolean,
|
||||
expireTime: Long
|
||||
) {
|
||||
val playTTS =
|
||||
playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
activity?.let {
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
ThreadUtils.runOnUiThread {
|
||||
val playTTS =
|
||||
playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
activity?.let {
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnumNew.getWarningContent(v2xType)
|
||||
|
||||
//占道施工预警
|
||||
if (v2xType.equals("10006") || v2xType.equals("100061")) {
|
||||
val currentTime = System.currentTimeMillis() / 1000
|
||||
val oldTime =
|
||||
context?.let { it -> SharedPrefsMgr.getInstance(it).getLong("roadwork", 0) }
|
||||
if (currentTime - oldTime!! > 60) { //超过一分钟,才会继续播报重复提醒
|
||||
context?.let { it ->
|
||||
SharedPrefsMgr.getInstance(it)
|
||||
.putLong("roadwork", System.currentTimeMillis() / 1000)
|
||||
// Log.d("liyz", "warningV2X v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent")
|
||||
//占道施工预警
|
||||
if (v2xType == "10006" || v2xType == "100061") {
|
||||
val currentTime = System.currentTimeMillis() / 1000
|
||||
val oldTime =
|
||||
context?.let { it -> SharedPrefsMgr.getInstance(it).getLong("roadwork", 0) }
|
||||
if (currentTime - oldTime!! > 60) { //超过一分钟,才会继续播报重复提醒
|
||||
context?.let { it ->
|
||||
SharedPrefsMgr.getInstance(it)
|
||||
.putLong("roadwork", System.currentTimeMillis() / 1000)
|
||||
}
|
||||
CallerAutoPilotManager.sendTripInfo(5, "", "", "", false)
|
||||
}
|
||||
CallerAutoPilotManager.sendTripInfo(5, "", "", "", false)
|
||||
}
|
||||
}
|
||||
|
||||
if (warningContent.isEmpty()) {
|
||||
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
|
||||
return
|
||||
}
|
||||
listener?.onShow()
|
||||
CallerLogger.d(
|
||||
"$M_HMI$TAG",
|
||||
"--- show v2x dialog 1 ---: info -> v2x-type: $v2xType : expireTime: $expireTime"
|
||||
)
|
||||
|
||||
lastShowV2XJob?.safeCancel()
|
||||
lastSpeakJob?.safeCancel()
|
||||
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
}.also { itx ->
|
||||
lastShowV2XJob = itx
|
||||
}.invokeOnCompletion { _ ->
|
||||
listener?.onDismiss()
|
||||
showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
|
||||
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
|
||||
if (warningContent.isEmpty()) {
|
||||
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
|
||||
return@runOnUiThread
|
||||
}
|
||||
listener?.onShow()
|
||||
CallerLogger.d(
|
||||
"$M_HMI$TAG",
|
||||
"--- show v2x dialog 1 ---: info -> v2x-type: $v2xType : expireTime: $expireTime"
|
||||
)
|
||||
lastShowV2XJob?.safeCancel()
|
||||
lifecycleScope.launch {
|
||||
speak(it, ttsContent)
|
||||
delay(expireTime)
|
||||
}.also { itx ->
|
||||
lastSpeakJob = itx
|
||||
lastShowV2XJob = itx
|
||||
}.invokeOnCompletion { _ ->
|
||||
listener?.onDismiss()
|
||||
showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
|
||||
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
|
||||
val last = lastSpeakJob.get()
|
||||
Log.d("CODE", "---- 0 ------: last: $last")
|
||||
if (last != null && !last.isCompleted) {
|
||||
Log.d("CODE", "---- 1 ------")
|
||||
return@runOnUiThread
|
||||
}
|
||||
lifecycleScope.launch(Dispatchers.Default) {
|
||||
Log.d("CODE", "---- 2 ------")
|
||||
speak(it, ttsContent)
|
||||
Log.d("CODE", "---- 3 ------")
|
||||
}.also { itx ->
|
||||
lastSpeakJob.set(itx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1082,18 +1090,26 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
/**
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int) {
|
||||
override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1102,7 +1118,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
*/
|
||||
override fun disableLimitingVelocity() {
|
||||
mViewLimitingVelocity?.visibility = View.GONE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1461,14 +1477,14 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
override fun showToBindingcarDialog() {
|
||||
if (toBindingCarDialog == null) {
|
||||
toBindingCarDialog = ToBindingCarDialog(requireContext())
|
||||
toBindingCarDialog = ToBindingCarDialog(ContextHolderUtil.getContext())
|
||||
}
|
||||
toBindingCarDialog!!.showToBindingcarDialog()
|
||||
}
|
||||
|
||||
override fun showModifyBindingcarDialog() {
|
||||
if (modifyBindingCarDialog == null) {
|
||||
modifyBindingCarDialog = ModifyBindingCarDialog(requireContext())
|
||||
modifyBindingCarDialog = ModifyBindingCarDialog(ContextHolderUtil.getContext())
|
||||
}
|
||||
modifyBindingCarDialog!!.showModifyBindingcarDialog()
|
||||
}
|
||||
@@ -1593,10 +1609,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
EXIT_AUTOPILOT_FOR_CHASSIS,
|
||||
EXIT_AUTOPILOT_FOR_DISTANCE -> {
|
||||
warningV2X(
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
|
||||
@@ -171,13 +171,21 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
noticeList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 0){
|
||||
noticeList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.SYS_INFO -> {
|
||||
ipcReportList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 1){
|
||||
ipcReportList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
badCaseList?.add(0,msgBoxList)
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
if(MsgBoxConfig.getUserRecord() == 2){
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -34,6 +33,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val report: Int = 4
|
||||
private val summary: Int = 5
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
private var changeViewListener: ChangeViewListener?=null
|
||||
@@ -47,89 +47,105 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
when (viewType) {
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_summary,parent,false)
|
||||
return BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleOperationHolder){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
}
|
||||
}else if(holder is BubbleReportHolder){
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
when (holder) {
|
||||
is BubbleOperationHolder -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}else if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position].bean
|
||||
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
is BubbleReportHolder -> {
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position].bean
|
||||
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,14 +172,16 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
return if(data!![position].type == MsgBoxType.OPERATION){
|
||||
operation
|
||||
}else if(data!![position].type == MsgBoxType.REPORT){
|
||||
return report
|
||||
report
|
||||
}else if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +214,12 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
fun setChangeListener(listener: ChangeViewListener){
|
||||
changeViewListener = listener
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -28,198 +27,263 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
* @description 司机端消息盒子列表视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean> ?= null
|
||||
private var data: List<MsgBoxBean>? = null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val obu: Int = 4
|
||||
private val report: Int = 5
|
||||
private val record: Int = 6
|
||||
private val traffic: Int = 7
|
||||
private val summary: Int = 8
|
||||
|
||||
//Error
|
||||
val RESULT_AUTOPILOT_DISABLE = "RESULT_AUTOPILOT_DISABLE"
|
||||
val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
|
||||
val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
fun setData(data: List<MsgBoxBean>) {
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == record){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bad_case,parent,false)
|
||||
return BadCaseHolder(view)
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_ipc_report,parent,false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}else if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_operation,parent,false)
|
||||
return MsgBoxOperation(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_notice,parent,false)
|
||||
return MsgBoxNotice(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_v2x,parent,false)
|
||||
return MsgBoxV2X(view)
|
||||
when (viewType) {
|
||||
record -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bad_case, parent, false)
|
||||
return BadCaseHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_ipc_report, parent, false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_operation, parent, false)
|
||||
return MsgBoxOperation(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_notice, parent, false)
|
||||
return MsgBoxNotice(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_summary, parent, false)
|
||||
return MsgBoxSummary(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_v2x, parent, false)
|
||||
return MsgBoxV2X(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BadCaseHolder){
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBagRecordTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxIpcReportHolder){
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if(reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)){
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
}else{
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList){
|
||||
actionStr = "${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
holder.tvStatusSelect.setOnClickListener {
|
||||
if(holder.tvReportLevelNormal.isVisible){
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
when (holder) {
|
||||
is BadCaseHolder -> {
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvBagRecordTime.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean, activity, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxOperation){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
holder.tvOperationTime.text = TimeUtils.millis2String(operationMsg.timestamp,getHourMinFormat())
|
||||
holder.tvOperationStatusSelect.setOnClickListener {
|
||||
if(holder.ivOperationImageNormal.isVisible){
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if (reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
) {
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
} else {
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList) {
|
||||
resultStr =
|
||||
"${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList) {
|
||||
actionStr =
|
||||
"${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
holder.tvStatusSelect.setOnClickListener {
|
||||
if (holder.tvReportLevelNormal.isVisible) {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_close),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationContentOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_open),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxNotice){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
is MsgBoxOperation -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
holder.tvOperationTime.text =
|
||||
TimeUtils.millis2String(operationMsg.timestamp, getHourMinFormat())
|
||||
holder.tvOperationStatusSelect.setOnClickListener {
|
||||
if (holder.ivOperationImageNormal.isVisible) {
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_close),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationContentOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_open),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else if(holder is MsgBoxV2X){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is MsgBoxNotice -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if (noticeFrCloudMsg.type == 0) {
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
} else if (noticeFrCloudMsg.type == 1) {
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl)
|
||||
.optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 ->
|
||||
CallerHmiManager.showTrafficBanner(
|
||||
it1
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxV2X -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
|
||||
)
|
||||
}
|
||||
}
|
||||
is MsgBoxSummary -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,26 +293,30 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return when(data!![position].type){
|
||||
MsgBoxType.OPERATION -> operation
|
||||
MsgBoxType.NOTICE -> notice
|
||||
MsgBoxType.V2X -> v2x
|
||||
MsgBoxType.OBU -> obu
|
||||
MsgBoxType.REPORT -> report
|
||||
MsgBoxType.RECORD -> record
|
||||
MsgBoxType.TRAFFIC -> traffic
|
||||
}
|
||||
return if (data!![position].type == MsgBoxType.OPERATION) {
|
||||
operation
|
||||
} else if (data!![position].type == MsgBoxType.NOTICE) {
|
||||
notice
|
||||
} else if (data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY) {
|
||||
summary
|
||||
} else if (data!![position].type == MsgBoxType.REPORT) {
|
||||
report
|
||||
} else if (data!![position].type == MsgBoxType.RECORD) {
|
||||
record
|
||||
} else {
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
//录包实体
|
||||
class BadCaseHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBagRecordTime: TextView= itemView.findViewById(R.id.tvBagRecordTime)
|
||||
class BadCaseHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvBagRecordTime: TextView = itemView.findViewById(R.id.tvBagRecordTime)
|
||||
var tvBagReceiveTime: TextView = itemView.findViewById(R.id.tvBagReceiveTime)
|
||||
var tvRecordCheck: TextView = itemView.findViewById(R.id.tvRecordCheck)
|
||||
}
|
||||
|
||||
//车辆系统信息
|
||||
class MsgBoxIpcReportHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxIpcReportHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivReportImageNormal: ImageView = itemView.findViewById(R.id.ivReportImageNormal)
|
||||
var tvReportLevelNormal: TextView = itemView.findViewById(R.id.tvReportLevelNormal)
|
||||
var tvReportTimeNormal: TextView = itemView.findViewById(R.id.tvReportTimeNormal)
|
||||
@@ -264,10 +332,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//运营平台
|
||||
class MsgBoxOperation(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxOperation(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivOperationImageNormal: ImageView = itemView.findViewById(R.id.ivOperationImageNormal)
|
||||
var tvOperationTitleNormal: TextView = itemView.findViewById(R.id.tvOperationTitleNormal)
|
||||
var tvOperationContentNormal: TextView = itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationContentNormal: TextView =
|
||||
itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationStatusSelect: TextView = itemView.findViewById(R.id.tvOperationStatusSelect)
|
||||
var tvOperationTime: TextView = itemView.findViewById(R.id.tvOperationTime)
|
||||
var ivOperationImageOpen: ImageView = itemView.findViewById(R.id.ivOperationImageOpen)
|
||||
@@ -276,7 +345,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//Notice
|
||||
class MsgBoxNotice(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxNotice(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
var tvNoticeTitle: TextView = itemView.findViewById(R.id.tvNoticeTitle)
|
||||
var tvNoticeTime: TextView = itemView.findViewById(R.id.tvNoticeTime)
|
||||
@@ -285,11 +354,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//V2X,OBU
|
||||
class MsgBoxV2X(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxV2X(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
|
||||
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class MsgBoxSummary(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,15 +8,11 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
@@ -34,6 +30,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
@@ -46,65 +43,83 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_summary,parent,false)
|
||||
BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
when (holder) {
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
|
||||
override fun onTick(p0: Long) {
|
||||
@@ -125,10 +140,12 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,4 +165,11 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,14 +7,10 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
@@ -32,6 +28,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
this.data = data
|
||||
@@ -39,61 +36,78 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_summary,parent,false)
|
||||
ListSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is ListNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
when (holder) {
|
||||
is ListNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is ListV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is ListV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is ListSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,10 +116,12 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,4 +141,11 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class ListSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
mAutoPilotStatusInfo?.let { it ->
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
UiThreadHandler.post {
|
||||
var actions: String? = null
|
||||
|
||||
@@ -16,6 +16,7 @@ import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import chassis.Chassis
|
||||
import chassis.VehicleStateOuterClass
|
||||
@@ -78,11 +79,13 @@ import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import java.text.SimpleDateFormat
|
||||
@@ -207,7 +210,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 100)
|
||||
Timer().schedule(timerTaskRefresh, Date(), 300)
|
||||
if (AppConfigInfo.isConnectAutopilot && (AppConfigInfo.plateNumber.isNullOrEmpty() || AppConfigInfo.iPCMacAddress.isNullOrEmpty())) {
|
||||
//查询工控机基础配置信息
|
||||
CallerAutoPilotManager.getCarConfig()
|
||||
@@ -623,6 +626,33 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbV2NFromCar.isChecked = FunctionBuildConfig.isV2NFromCar
|
||||
//v2n车端预警
|
||||
tbV2NFromCar.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isV2NFromCar = isChecked
|
||||
if (!FunctionBuildConfig.isV2NFromCar) {
|
||||
tbV2NFromCar.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbDrawAiCloudFusion.isChecked = FunctionBuildConfig.isDrawAiCloudFusion
|
||||
//云端感知绘制
|
||||
tbDrawAiCloudFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isDrawAiCloudFusion = isChecked
|
||||
if (!FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
tbDrawAiCloudFusion.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//云端感知绘制
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
if (!FunctionBuildConfig.isRomaMode) {
|
||||
tbDrawRomaMode.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
CallerAutoPilotManager.sendIpcReboot()
|
||||
@@ -1119,8 +1149,9 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTraffic.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) { //默认开启
|
||||
if (isChecked) { //默认开启
|
||||
CallerHmiManager.setObuWeaknessTraffic(true)
|
||||
} else {
|
||||
CallerHmiManager.setObuWeaknessTraffic(false)
|
||||
@@ -1130,6 +1161,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTraffic.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) { //默认关闭
|
||||
CallerHmiManager.setCloudWeaknessTraffic(true)
|
||||
@@ -1797,10 +1829,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvIpcInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvIpcInfoKey.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
val autopilotJson = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvAutopilotInfo.text = autopilotJson
|
||||
tvIpcInfo.text = autopilotJson
|
||||
tvIpcInfoKey.text = autopilotJson
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
@@ -1845,18 +1877,20 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* OBU状态回调
|
||||
*/
|
||||
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
lifecycleOwner.lifecycleScope.launch {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
|
||||
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
|
||||
if (obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = true
|
||||
}
|
||||
//OBU断开连接,提示异常
|
||||
if (obuConnectStatus && !obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = false
|
||||
toastMsg("OBU连接状态异常")
|
||||
if (obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = true
|
||||
}
|
||||
//OBU断开连接,提示异常
|
||||
if (obuConnectStatus && !obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = false
|
||||
toastMsg("OBU连接状态异常")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) { //默认开启
|
||||
CallerHmiManager.setObuWeaknessTraffic(true)
|
||||
@@ -89,6 +90,7 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) { //默认关闭
|
||||
CallerHmiManager.setCloudWeaknessTraffic(true)
|
||||
|
||||
@@ -20,8 +20,8 @@ class LimitingVelocityView @JvmOverloads constructor(
|
||||
LayoutInflater.from(context).inflate(R.layout.view_limiting_speed_vr, this, true)
|
||||
}
|
||||
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed)
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int, limitSource: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed, limitSource)
|
||||
tvLimitingVelocity.text = "$limitingSpeed"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
@@ -34,12 +35,14 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setLockMode(true)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
} else if (MogoMapUIController.getInstance().currentMapVisualAngle.isMediumSight) {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setLockMode(false)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
} else {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
|
||||
@@ -174,7 +174,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
* @param lightSource 1:云端下发;2:自车感知; 3:OBU
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: Int,lightSource: Int) {
|
||||
UiThreadHandler.post {
|
||||
@@ -200,6 +200,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
2 -> {
|
||||
mLightSourceTV!!.text = "自车感知"
|
||||
}
|
||||
3 -> {
|
||||
mLightSourceTV!!.text = "OBU"
|
||||
}
|
||||
else -> {
|
||||
mLightSourceTV!!.visibility = GONE
|
||||
}
|
||||
@@ -208,9 +211,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun resetView(){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源 ,由于需要知道来源,这里不在限制
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
@@ -219,15 +222,15 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
}else{
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = View.VISIBLE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -178,7 +178,7 @@ public class SpeedChartView extends View {
|
||||
setAnimation(lastAngle, currentAngle, 1000);
|
||||
lastAngle = currentAngle;
|
||||
//重新绘制
|
||||
postInvalidate();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
this.timerTask = task
|
||||
timer.schedule(task, Date(), 100)
|
||||
timer.schedule(task, Date(), 200)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingCarListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsUpgradeListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
|
||||
@@ -120,7 +120,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
IntentManager.getInstance().unregisterIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
|
||||
//ActivityLifecycleManager.getInstance().setAppActive(false);
|
||||
// ActivityLifecycleManager.getInstance().setAppActive(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -221,17 +221,18 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
ToastUtils.showShort("方块 A 按AB组合 +1 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressADownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按A 无 操作 ");
|
||||
ToastUtils.showShort("方块 长按A -2 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
@@ -261,17 +262,16 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
ToastUtils.showShort("方块 B 按AB组合 +1 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressBDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按B +1 ");
|
||||
ToastUtils.showShort("方块 长按B 无操作 ");
|
||||
}
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.MogoModule;
|
||||
import com.mogo.commons.module.MogoModulePaths;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
|
||||
@@ -182,6 +182,21 @@
|
||||
app:layout_goneMarginTop="40dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<!--限速来源-->
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewLimitingVelocity" />
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
@@ -239,8 +254,8 @@
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
|
||||
android:id="@+id/viewDriverMsgBoxList"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="746dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="40dp"
|
||||
@@ -249,7 +264,7 @@
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
|
||||
android:id="@+id/viewDriverMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -259,7 +274,7 @@
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="650px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
@@ -270,8 +285,8 @@
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
|
||||
android:id="@+id/viewPassengerMsgBoxList"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="750dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger"
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layoutBadCase"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:clickable="true"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBadCaseImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/icon_bad_case"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -33,8 +32,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBadCaseImage"
|
||||
android:text="录包提醒"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="25px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -43,9 +42,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivBadCaseImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBadCaseImage"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -55,8 +54,8 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvRecordTip"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="24dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -66,11 +65,11 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvBagRecordTime"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBagRecordTime"
|
||||
android:paddingEnd="25px"
|
||||
android:paddingStart="20px"
|
||||
android:paddingEnd="25dp"
|
||||
android:paddingStart="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,27 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportImageNormal"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -30,10 +30,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageNormal"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginStart="23px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -43,8 +43,8 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportLevelNormal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportLevelNormal"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:layout_marginTop="5px"
|
||||
android:textSize="28dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTimeNormal"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:gravity="start"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
@@ -72,18 +72,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
android:drawablePadding="10dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -93,20 +93,20 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvStatusSelect"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvStatusSelect"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportImageOpen"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivReportImageOpen"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageOpen"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="10px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivReportImageOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivReportImageOpen"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -143,7 +143,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportTimeOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTimeOpen"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -157,7 +157,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -170,9 +170,9 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="15px"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -42,9 +42,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -53,11 +53,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -72,7 +72,7 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,27 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationImageNormal"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
/>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationImageNormal"
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="23px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="23dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -45,13 +45,13 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOperationTitleNormal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvOperationTitleNormal"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStatusSelect"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:gravity="start"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:paddingBottom="15px"
|
||||
android:paddingBottom="15dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
@@ -61,18 +61,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
android:drawablePadding="10dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -82,19 +82,19 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvOperationStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvOperationStatusSelect"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvOperationStatusSelect"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationImageOpen"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -108,8 +108,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationImageOpen"
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="10px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -122,11 +122,11 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivOperationImageOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStatusSelect"
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
android:layout_margin="25dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
@@ -26,9 +26,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -39,9 +39,9 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:clickable="true"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
@@ -28,10 +27,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -41,9 +40,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -52,11 +51,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -71,7 +70,7 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBubbleOperationImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
/>
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvBubbleOperationContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleOperationImage"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:text="运营平台"
|
||||
/>
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvBubbleOperationTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBubbleOperationTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -57,7 +57,7 @@
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBubbleReportImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_report_error_normal"
|
||||
/>
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleReportImage"
|
||||
android:layout_marginTop="15px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:text="Error"
|
||||
/>
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTitle"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -52,9 +52,9 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTime"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTime"
|
||||
app:layout_constraintRight_toRightOf="@id/tvBubbleReceiveTime"
|
||||
android:layout_marginTop="6px"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start"
|
||||
@@ -67,9 +67,9 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvBubbleReportTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBubbleReportTitle"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
android:layout_margin="25dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
@@ -24,9 +24,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -37,9 +37,9 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="16px"
|
||||
android:layout_marginBottom="16px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="160px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -25,20 +25,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25px"
|
||||
android:layout_height="23px"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="23dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvPassengerNoticeTitle"
|
||||
android:layout_marginStart="10px"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/icon_msg_box_video"
|
||||
/>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
@@ -59,11 +59,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="160dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -71,8 +71,8 @@
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -84,11 +84,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="160dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="16px"
|
||||
android:layout_marginBottom="16px">
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginStart="20dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -26,8 +26,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:layout_marginEnd="20px"
|
||||
android:textSize="26dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -42,9 +42,9 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
@@ -32,7 +32,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
@@ -44,11 +44,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="150px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="150dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -56,8 +56,8 @@
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -69,11 +69,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="150dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -21,7 +21,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#99FFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -36,9 +36,9 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="864px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_bubble"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="746dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgNotice"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="通知"
|
||||
android:textColor="@color/msg_box_title_color"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:gravity="center"
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewNoticeDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgNotice"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgNotice"
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgIpcReport"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="车辆系统信息"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvMsgNotice"
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewIpcReportDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgIpcReport"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgIpcReport"
|
||||
@@ -54,11 +54,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgBadCase"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="录包"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewBadCaseDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgBadCase"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgBadCase"
|
||||
@@ -81,7 +81,7 @@
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMsgIpcReport"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rvPassengerBubbleList"
|
||||
android:layout_width="650px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="750dp"
|
||||
android:background="@drawable/bg_msg_box_list_p"
|
||||
app:roundLayoutRadius="40px"
|
||||
app:roundLayoutRadius="40dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginBottom="16px">
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPassengerList"
|
||||
@@ -15,8 +15,8 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -242,6 +242,42 @@
|
||||
android:textOn="关闭感知优化模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbV2NFromCar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启车端V2N预警"
|
||||
android:textOn="关闭车端V2N预警"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawAiCloudFusion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启云端感知绘制"
|
||||
android:textOn="关闭云端感知绘制"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawRomaMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启漫游模式"
|
||||
android:textOn="关闭漫游模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbMojie"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingVelocity"
|
||||
@@ -16,7 +17,5 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_60"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
/>
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
|
||||
</LinearLayout>
|
||||
@@ -2,4 +2,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.map">
|
||||
|
||||
<application>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.business.ai.AiCloudRangeBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.map.aiCloud.notification" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudIdentifyData"
|
||||
|
||||
var START_METRE = 200
|
||||
var END_METRE = 2000
|
||||
|
||||
@JvmStatic
|
||||
val aiCloudIdentifyDataManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
AiCloudIdentifyDataManager()
|
||||
}
|
||||
}
|
||||
|
||||
private val aiCloudIdentifyNetWorkModel = AiCloudIdentifyNetWorkModel()
|
||||
private var showAiCloud = false
|
||||
|
||||
fun init(mContext: Context) {
|
||||
MogoApisHandler.getInstance().apis.registerCenterApi.registerMogoMapListener(TAG, this)
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.registerOnMessageListener(
|
||||
0x040003, //低频数据
|
||||
object : IMogoOnMessageListener<SocketDownData.SocketDownDataProto> {
|
||||
override fun target(): Class<SocketDownData.SocketDownDataProto> {
|
||||
return SocketDownData.SocketDownDataProto::class.java
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
linkCode = ChainConstant.CHAIN_LINK_ADAS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onMsgReceived(obj: SocketDownData.SocketDownDataProto?) {
|
||||
if(!FunctionBuildConfig.isDrawAiCloudFusion){
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (showAiCloud) {
|
||||
if (it.allListList == null || it.allListList.size == 0) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
MapIdentifySubscriber.instance.renderAiCloudResult(it.allListList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
requestRangeOfIdentify()
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify() {
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange({
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE"
|
||||
)
|
||||
}, {
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE"
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
override fun onMapVisualAngleChanged(visualAngleMode: VisualAngleMode) {
|
||||
super.onMapVisualAngleChanged(visualAngleMode)
|
||||
when {
|
||||
visualAngleMode.isRoma -> {
|
||||
showAiCloud = true
|
||||
FunctionBuildConfig.isDrawIdentifyData = false
|
||||
}
|
||||
else -> {
|
||||
showAiCloud = false
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
|
||||
class AiCloudRangeBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudRangeBroadcastReceiver"
|
||||
private const val START_RANGE = "startRange"
|
||||
private const val END_RANGE = "endRange"
|
||||
|
||||
// adb shell am broadcast -a com.map.aiCloud.notification --ei startRange 140 --ei endRange 2000
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val startRange = intent.getIntExtra(START_RANGE, START_METRE)
|
||||
val endRange = intent.getIntExtra(END_RANGE, END_METRE)
|
||||
START_METRE = startRange
|
||||
END_METRE = endRange
|
||||
CallerLogger.d("$M_MAP$TAG", "startRange:$startRange, endRange:$endRange")
|
||||
aiCloudIdentifyDataManager.requestRangeOfIdentify()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mogo.eagle.core.function.business.ai.net
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.zhjt.service_biz.FuncConfig
|
||||
|
||||
class AiCloudIdentifyNetWorkModel {
|
||||
|
||||
companion object {
|
||||
val aiCloudIdentifyNetWorkModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
AiCloudIdentifyNetWorkModel()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getHost(): String {
|
||||
var host = "http://dzt-city.zhidaozhixing.com"
|
||||
when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV,
|
||||
DebugConfig.NET_MODE_QA -> host = "http://dzt-qa-city.zhidaozhixing.com"
|
||||
}
|
||||
return host
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = getHost()): IAiCloudIdentifyApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(IAiCloudIdentifyApiService::class.java)
|
||||
}
|
||||
|
||||
fun requestIdentifyRange(
|
||||
onSuccess: (() -> Unit),
|
||||
onError: ((String) -> Unit)
|
||||
) {
|
||||
request<BaseResponse<Any>> {
|
||||
val map = mutableMapOf<String, Any>()
|
||||
start {
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["status"] = true
|
||||
map["startMetre"] = START_METRE
|
||||
map["endMetre"] = END_METRE
|
||||
map["type"] = 1
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
getNetWorkApi().identifyRange(map)
|
||||
}
|
||||
}
|
||||
onSuccess {
|
||||
onSuccess.invoke()
|
||||
}
|
||||
onError {
|
||||
it.message?.let { errorMsg ->
|
||||
onError.invoke(errorMsg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.function.business.ai.net
|
||||
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.Headers
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface IAiCloudIdentifyApiService {
|
||||
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("yycp-c-v2x-service/dataFusion/remoteDrivingSet")
|
||||
suspend fun identifyRange(@Body map: MutableMap<String, Any>): BaseResponse<Any>
|
||||
}
|
||||
@@ -3,16 +3,35 @@ package com.mogo.eagle.core.function.business.identify
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
interface Identify {
|
||||
|
||||
fun renderAdasRecognizedResult(resultList: List<TrackedObject>?)
|
||||
fun renderAdasRecognizedResult(resultList: List<TrackedObject>?){
|
||||
|
||||
fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?)
|
||||
}
|
||||
|
||||
fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>){
|
||||
|
||||
}
|
||||
|
||||
fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?){
|
||||
|
||||
}
|
||||
|
||||
fun renderOBUWarningObj(exist: Boolean, obuTrafficData: TrafficData) {
|
||||
|
||||
}
|
||||
|
||||
fun clearOldMarker()
|
||||
fun clearOldMarker(){
|
||||
|
||||
}
|
||||
|
||||
fun clearAiMarker(){
|
||||
|
||||
}
|
||||
|
||||
fun getIdentifyObj(uuid: String):TrackedObject?{
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.collection.ArraySet
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
|
||||
import com.mogo.map.MogoMarkerManager
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
class IdentifyAiCloudDataDrawer : Identify {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "IdentifyDataDrawer"
|
||||
}
|
||||
|
||||
/**
|
||||
* 上一帧数据的缓存
|
||||
*/
|
||||
private val mMarkersCaches = ConcurrentHashMap<String, SocketDownData.CloudRoadDataProto>()
|
||||
|
||||
/**
|
||||
* 记录每次实际绘制的交通元素UUID
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private val trafficDataUuidList = ArraySet<String>()
|
||||
|
||||
/**
|
||||
* 过滤后的数据集合
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private val mFilterTrafficData = HashMap<String, SocketDownData.CloudRoadDataProto>()
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>) {
|
||||
if (resultList.isEmpty()) {
|
||||
clearOldMarker()
|
||||
w(TAG, "感知数据为空无需渲染……")
|
||||
return
|
||||
}
|
||||
if (!MogoStatusManager.getInstance().isVrMode) {
|
||||
clearOldMarker()
|
||||
w(TAG, "渲染 adas 识别的数据 当前不是VR模式")
|
||||
return
|
||||
}
|
||||
|
||||
//清除缓存
|
||||
for (data in resultList) {
|
||||
if (trafficDataUuidList.size > 0 && trafficDataUuidList.contains("" + data.uuid)) {
|
||||
trafficDataUuidList.remove("" + data.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
//清除缓存,删除marker
|
||||
val it: MutableIterator<*> = trafficDataUuidList.iterator()
|
||||
while (it.hasNext()) {
|
||||
val key = it.next() as String
|
||||
it.remove()
|
||||
mMarkersCaches.remove(key)
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.removeMarker(key.hashCode().toString())
|
||||
}
|
||||
|
||||
val filterList = filterTrafficData(resultList)
|
||||
if (filterList.size > 0) {
|
||||
// 绘制新数据
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.updateBatchAiMarkerPosition(filterList)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据过滤器
|
||||
*
|
||||
* @return 过滤后的数据集合
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private fun filterTrafficData(trafficData: List<SocketDownData.CloudRoadDataProto>): HashMap<String, SocketDownData.CloudRoadDataProto> {
|
||||
mFilterTrafficData.clear()
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
val uuid = "" + data.uuid
|
||||
mMarkersCaches[uuid] = data
|
||||
trafficDataUuidList.add(uuid)
|
||||
mFilterTrafficData[uuid] = data
|
||||
}
|
||||
return mFilterTrafficData
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun clearAiMarker() {
|
||||
trafficDataUuidList.clear()
|
||||
mMarkersCaches.forEach { (uuid, _) ->
|
||||
mMarkersCaches.remove(uuid)
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.removeMarker(uuid.hashCode().toString())
|
||||
}
|
||||
mFilterTrafficData.clear()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,5 +61,9 @@ class IdentifyBeautifyDataDrawer : Identify {
|
||||
TrackManager.getInstance().clearAll()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return TrackManager.getInstance().getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
|
||||
@@ -22,7 +23,12 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
internal val beautifyDataDrawer = IdentifyBeautifyDataDrawer()
|
||||
}
|
||||
|
||||
object AiIdentify {
|
||||
internal val aiCloudDataDrawer = IdentifyAiCloudDataDrawer()
|
||||
}
|
||||
|
||||
private var identify: Identify? = null
|
||||
private var aiCloudIdentify: Identify? = null
|
||||
|
||||
init {
|
||||
identify = if (FunctionBuildConfig.isBeautyMode) {
|
||||
@@ -30,14 +36,17 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
} else {
|
||||
DriverIdentify.originDataDrawer
|
||||
}
|
||||
aiCloudIdentify = AiIdentify.aiCloudDataDrawer
|
||||
CallerObuListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private const val MSG_DATA_TRACK = 0
|
||||
private const val MSG_DATA_WARNING = 1
|
||||
private const val MSG_DATA_OBU_WARNING_UPDATE = 2
|
||||
private const val MSG_DATA_OBU_WARNING_REMOVE = 3
|
||||
private const val MSG_DATA_CLEAR = 4
|
||||
private const val MSG_DATA_AI_TRACK = 1
|
||||
private const val MSG_DATA_WARNING = 2
|
||||
private const val MSG_DATA_OBU_WARNING_UPDATE = 3
|
||||
private const val MSG_DATA_OBU_WARNING_REMOVE = 4
|
||||
private const val MSG_DATA_CLEAR = 5
|
||||
private const val MSG_DATA_AI_CLEAR = 6
|
||||
|
||||
// 维护一个线程定时轮询数据进行地图绘制
|
||||
private val mDrawerHandler: Handler =
|
||||
@@ -63,6 +72,11 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
identify!!.renderAdasRecognizedResult(msg.obj as List<TrackedObject>?)
|
||||
}
|
||||
}
|
||||
MSG_DATA_AI_TRACK -> {
|
||||
if (msg.obj is List<*>) {
|
||||
aiCloudIdentify!!.renderAiCloudResult(msg.obj as List<SocketDownData.CloudRoadDataProto>)
|
||||
}
|
||||
}
|
||||
MSG_DATA_WARNING -> {
|
||||
if (msg.obj is List<*>) {
|
||||
identify!!.renderPlanningWarningObj(msg.obj as List<MessagePad.PlanningObject>?)
|
||||
@@ -81,6 +95,9 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
MSG_DATA_CLEAR -> {
|
||||
identify!!.clearOldMarker()
|
||||
}
|
||||
MSG_DATA_AI_CLEAR -> {
|
||||
aiCloudIdentify!!.clearAiMarker()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,6 +109,13 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_AI_TRACK
|
||||
message.obj = resultList
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_WARNING
|
||||
@@ -105,6 +129,16 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun clearAiMarker() {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_AI_CLEAR
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return identify?.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
val message = Message.obtain()
|
||||
|
||||
@@ -136,4 +136,8 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
WarningHelper.clear()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return mMarkersCaches[uuid]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_IDENTIFY
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMoGoIdentifyListener
|
||||
import com.mogo.eagle.core.function.business.identify.IdentifyFactory.AiIdentify.aiCloudDataDrawer
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
/**
|
||||
* 订阅感知数据的订阅者
|
||||
@@ -14,7 +20,8 @@ import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
@Route(path = PATH_IDENTIFY)
|
||||
class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGoSubscriber,
|
||||
IMoGoAutopilotIdentifyListener {
|
||||
|
||||
private val TAG = "MapIdentifySubscriber"
|
||||
@@ -36,7 +43,6 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: List<TrackedObject>?) {
|
||||
@@ -53,6 +59,26 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
}
|
||||
|
||||
fun renderAiCloudResult(cloudData: List<SocketDownData.CloudRoadDataProto>) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
// aiCloudDataDrawer.renderAiCloudResult(cloudData)
|
||||
IdentifyFactory.renderAiCloudResult(cloudData)
|
||||
}
|
||||
} else {
|
||||
clearAiCloudRoma()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
fun clearAiCloudRoma() {
|
||||
// aiCloudDataDrawer.clearAiMarker()
|
||||
IdentifyFactory.clearAiMarker()
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyPlanningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawIdentifyData && FunctionBuildConfig.debugTrackerProvider == 0) {
|
||||
@@ -67,7 +93,12 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotWarnMessage(warn: MessagePad.Warn?) {
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return IdentifyFactory.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -163,4 +163,13 @@ public class TrackManager {
|
||||
mMarkersCaches.forEach((uuid, trackObj) -> removeKey(uuid));
|
||||
}
|
||||
|
||||
public MessagePad.TrackedObject getIdentifyObj(String uuid) {
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
if (trackObj != null && trackObj.getCache() != null) {
|
||||
return trackObj.getCache();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,9 +23,8 @@ public class TrackObj {
|
||||
private S2CellId s2CellId; //s2 id权重
|
||||
private S2LatLng s2LatLng; //s2 经纬度
|
||||
private double recentlyTime; //用于缓存帧数判断,暂定缓存1秒数据,中间如果有物体未出现,1秒后删除
|
||||
private double roadAngle; //道路航向
|
||||
private int[] typeArray = new int[3];
|
||||
private int typeWeight; //类型权重
|
||||
// private int[] typeArray = new int[3];
|
||||
// private int typeWeight; //类型权重
|
||||
private double lat;
|
||||
private double lon;
|
||||
private double speedAverage;
|
||||
@@ -37,11 +36,6 @@ public class TrackObj {
|
||||
lon = data.getLongitude();
|
||||
s2LatLng = S2LatLng.fromDegrees(data.getLatitude(), data.getLongitude());
|
||||
s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22); //需要验证22前后
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(lon, lat, -1);
|
||||
if (centerLine != null && centerLine.getAngle() != 0) {
|
||||
roadAngle = centerLine.getAngle();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private MessagePad.TrackedObject cacheData;
|
||||
@@ -68,20 +62,20 @@ public class TrackObj {
|
||||
objQueueList.sort(Comparator.comparing(ObjQueue::getSpeed));
|
||||
speedAverage = objQueueList.get(1).getSpeed();
|
||||
//计算类型
|
||||
typeArray[0] = objQueueList.get(0).getType();
|
||||
typeArray[1] = objQueueList.get(1).getType();
|
||||
typeArray[2] = objQueueList.get(2).getType();
|
||||
// typeArray[0] = objQueueList.get(0).getType();
|
||||
// typeArray[1] = objQueueList.get(1).getType();
|
||||
// typeArray[2] = objQueueList.get(2).getType();
|
||||
} else {
|
||||
double cal = 0;
|
||||
List<ObjQueue> objQueueList = circleQueue.getPreFrame();
|
||||
for (int i = 0; i < objQueueList.size() - 1; i++) {
|
||||
cal += objQueueList.get(i).getSpeed();
|
||||
typeArray[i] = objQueueList.get(i).getType();
|
||||
// typeArray[i] = objQueueList.get(i).getType();
|
||||
}
|
||||
speedAverage = cal / objQueueList.size();
|
||||
}
|
||||
typeArray = Arrays.stream(typeArray).sorted().toArray();
|
||||
typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2];
|
||||
// typeArray = Arrays.stream(typeArray).sorted().toArray();
|
||||
// typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2];
|
||||
|
||||
// 重新给静止物体赋值速度
|
||||
if (relativeStatic()) {
|
||||
@@ -107,18 +101,18 @@ public class TrackObj {
|
||||
|
||||
private void calHeading() {
|
||||
//更正数据,速度小于LIMIT_SPEED使用上一帧数据
|
||||
if (relativeStatic()) {
|
||||
if (roadAngle != 0.0) {
|
||||
CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(lon, lat, -1);
|
||||
if (centerLine != null && centerLine.getAngle() != 0) {
|
||||
cacheData = cacheData.toBuilder().setHeading(centerLine.getAngle()).build();
|
||||
} else {
|
||||
cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
}
|
||||
} else {
|
||||
cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
}
|
||||
}
|
||||
// if (relativeStatic()) {
|
||||
// if (roadAngle != 0.0) {
|
||||
// CenterLine centerLine = CallerHDMapManager.INSTANCE.getCenterLineInfo(lon, lat, -1);
|
||||
// if (centerLine != null && centerLine.getAngle() != 0) {
|
||||
// cacheData = cacheData.toBuilder().setHeading(centerLine.getAngle()).build();
|
||||
// } else {
|
||||
// cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
// }
|
||||
// } else {
|
||||
// cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public double getRecentlyTime() {
|
||||
@@ -167,11 +161,11 @@ public class TrackObj {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFourWheelType() {
|
||||
return typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.getType()
|
||||
&& typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType()
|
||||
&& typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType();
|
||||
}
|
||||
// public boolean isFourWheelType() {
|
||||
// return typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.getType()
|
||||
// && typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType()
|
||||
// && typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType();
|
||||
// }
|
||||
|
||||
private double[] getCenterPoint(List<ObjQueue> objQueueList) {
|
||||
int total = objQueueList.size();
|
||||
|
||||
@@ -9,9 +9,8 @@ object TrackerSourceColorHelper {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type
|
||||
) {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)) {
|
||||
return true
|
||||
}
|
||||
var trackIPCFilter = true
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.text.TextUtils;
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerNoveltyInfo;
|
||||
@@ -19,7 +20,6 @@ import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -81,7 +81,7 @@ public class MarkerDrawer {
|
||||
Object bindObj = markerShowEntity.getBindObj();
|
||||
if (bindObj instanceof MarkerExploreWay && ((MarkerExploreWay) bindObj).getPoiType() != null) {
|
||||
String poiType = ((MarkerExploreWay) bindObj).getPoiType();
|
||||
options.icon3DRes(EventTypeEnum.getMarker3DRes(poiType));
|
||||
options.icon3DRes(EventTypeEnumNew.getMarker3DRes(poiType));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ object TrafficMarkerDrawer {
|
||||
fun updateITrafficThreatLevelInfo(trafficData: TrafficData) {
|
||||
CallerLogger.d(TAG,
|
||||
"trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel + "----FunctionBuildConfig.debugTrackerProvider = " + FunctionBuildConfig.debugTrackerProvider)
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
return
|
||||
}
|
||||
if (trafficData != null && !TextUtils.isEmpty(trafficData.uuid)) {
|
||||
@@ -128,6 +128,10 @@ object TrafficMarkerDrawer {
|
||||
fun removeCvxRvInfoIndInfo(key: String) {
|
||||
if (mTrafficMap.containsKey(key)) {
|
||||
mTrafficMap.remove(key)
|
||||
mMarkersCaches.get(key)?.let {
|
||||
it.remove()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager;
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber;
|
||||
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber;
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager;
|
||||
@@ -191,6 +193,7 @@ public class MapFragment extends MvpFragment<MapView, MapPresenter>
|
||||
MapIdentifySubscriber.Companion.getInstance();
|
||||
MogoRouteOverlayManager.getInstance().init();
|
||||
MapPointCloudSubscriber.Companion.getInstance();
|
||||
AiCloudIdentifyDataManager.Companion.getAiCloudIdentifyDataManager().init(AbsMogoApplication.getApp());
|
||||
}
|
||||
|
||||
private void queryInfStructure() {
|
||||
|
||||
@@ -38,8 +38,11 @@ data class V2XEvent(
|
||||
@SerializedName("radius")
|
||||
var radius: Double,
|
||||
|
||||
@SerializedName("type")
|
||||
var type: Int
|
||||
@SerializedName("poiType")
|
||||
var poiType: String?,
|
||||
|
||||
@SerializedName("coordinateType")
|
||||
var coordinateType:Int? = null
|
||||
)
|
||||
|
||||
@Keep
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.function.overview.OverviewDao
|
||||
import com.mogo.eagle.core.function.overview.remote.OverViewServiceApi
|
||||
import com.mogo.eagle.core.function.overview.remote.V2XEvent
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
@@ -22,6 +24,10 @@ class OverViewModel(
|
||||
private val _V2XEvents = MutableLiveData<List<V2XEvent>>()
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
companion object {
|
||||
const val TAG = "OverViewModel"
|
||||
}
|
||||
|
||||
val infStructures
|
||||
get() = _infStructures
|
||||
|
||||
@@ -90,8 +96,10 @@ class OverViewModel(
|
||||
.queryAllV2XEventsByLineId(lineId.toString(), sn)
|
||||
.map {
|
||||
if (it.code == 200 || it.code == 0) {
|
||||
CallerLogger.d(SceneConstant.M_MAP + TAG, "请求成功,size为:${it.result?.v2XEventList?.size}")
|
||||
return@map it.result?.v2XEventList
|
||||
} else {
|
||||
CallerLogger.d(SceneConstant.M_MAP + TAG, "请求失败,code为:${it.code}")
|
||||
return@map ArrayList()
|
||||
}
|
||||
}
|
||||
@@ -121,7 +129,12 @@ class OverViewModel(
|
||||
if (parameter != null) {
|
||||
if (parameter.autoPilotLine != null) {
|
||||
lineId = parameter.autoPilotLine!!.lineId
|
||||
CallerLogger.d(SceneConstant.M_MAP + TAG, "lineId为:$lineId")
|
||||
} else {
|
||||
CallerLogger.d(SceneConstant.M_MAP + TAG, "parameter.autoPilotLine为null")
|
||||
}
|
||||
} else {
|
||||
CallerLogger.d(SceneConstant.M_MAP + TAG, "parameter为null")
|
||||
}
|
||||
return lineId
|
||||
}
|
||||
|
||||
@@ -268,10 +268,16 @@ public class AMapCustomView
|
||||
if (center != null) {
|
||||
center.getLon();
|
||||
MarkerOptions markerOption = new MarkerOptions();
|
||||
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
|
||||
LatLng latLng;
|
||||
if (event.getCoordinateType() == null || event.getCoordinateType() == 0) {
|
||||
latLng = new LatLng(center.getLat(), center.getLon());
|
||||
} else {
|
||||
// wgs84坐标系需转成高德坐标系
|
||||
latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
|
||||
}
|
||||
markerOption.position(latLng);
|
||||
markerOption.anchor(0.13f, 1f);
|
||||
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap()));
|
||||
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap(event.getPoiType())));
|
||||
markerOptionsList.add(markerOption);
|
||||
}
|
||||
}
|
||||
@@ -284,8 +290,8 @@ public class AMapCustomView
|
||||
currMarkerList = mAMap.addMarkers(markerOptionsList, false);
|
||||
}
|
||||
|
||||
private Bitmap getV2XBitmap() {
|
||||
V2XMarkerView marker = new V2XMarkerView(getContext());
|
||||
private Bitmap getV2XBitmap(String poiType) {
|
||||
V2XMarkerView marker = new V2XMarkerView(getContext(), null, 0, poiType);
|
||||
marker.measure(View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 229), View.MeasureSpec.EXACTLY),
|
||||
View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 96), View.MeasureSpec.EXACTLY));
|
||||
marker.layout(0, 0, marker.getMeasuredWidth(), marker.getMeasuredHeight());
|
||||
|
||||
@@ -141,12 +141,12 @@ public class SmallMapFragment extends BaseFragment
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
int tempStatus = autoPilotStatusInfo.getPilotmode();
|
||||
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" autoPilotStatus:"+autoPilotStatus);
|
||||
// CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" autoPilotStatus:"+autoPilotStatus);
|
||||
if (tempStatus != 1) {
|
||||
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" clearPolyline");
|
||||
// CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" clearPolyline");
|
||||
clearPolyline();
|
||||
}else if (tempStatus == 1 && autoPilotStatus == 0){
|
||||
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath");
|
||||
// CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath");
|
||||
CallerAutoPilotManager.INSTANCE.getGlobalPath();
|
||||
}
|
||||
autoPilotStatus = tempStatus;
|
||||
|
||||
@@ -3,14 +3,16 @@ package com.mogo.eagle.core.function.smp
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import kotlinx.android.synthetic.main.view_maker_with_count.view.*
|
||||
|
||||
class V2XMarkerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
defStyleAttr: Int = 0,
|
||||
private val poiType: String? = ""
|
||||
) : ConstraintLayout (
|
||||
context,
|
||||
attrs,
|
||||
@@ -19,5 +21,33 @@ class V2XMarkerView @JvmOverloads constructor(
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_v2x_maker, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
val iconView = findViewById<ImageView>(R.id.ivIcon)
|
||||
val contentView = findViewById<TextView>(R.id.tvContent)
|
||||
when (poiType) {
|
||||
"10006" -> {
|
||||
iconView.setBackgroundResource(R.drawable.icon_small_v2x_road_construction)
|
||||
contentView.text = "道路施工"
|
||||
}
|
||||
"10007" -> {
|
||||
iconView.setBackgroundResource(R.drawable.icon_v2x_road_congestion)
|
||||
contentView.text = "道路拥堵"
|
||||
}
|
||||
"10032" -> {
|
||||
iconView.setBackgroundResource(R.drawable.icon_v2x_road_accidents)
|
||||
contentView.text = "道路事故"
|
||||
}
|
||||
"10025" -> {
|
||||
iconView.setBackgroundResource(R.drawable.icon_v2x_obstacle)
|
||||
contentView.text = "障碍车辆"
|
||||
}
|
||||
// "10031" -> {
|
||||
// iconView.setBackgroundResource(R.drawable.icon_small_v2x_road_construction)
|
||||
// contentView.text = "弱势预警"
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv"
|
||||
android:id="@+id/tvContent"
|
||||
android:layout_width="119dp"
|
||||
android:layout_height="35dp"
|
||||
android:text="道路施工"
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.msgbox
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb
|
||||
@@ -88,7 +87,16 @@ object DataManager {
|
||||
msg.timestamp = System.currentTimeMillis()
|
||||
msg.bean2Json = GsonUtils.toJson(msg.bean)
|
||||
when (type) {
|
||||
MsgBoxType.V2X, MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION -> {
|
||||
MsgBoxType.V2X -> {
|
||||
// 汇总消息不存数据库
|
||||
if (msg.sourceType != DataSourceType.SUMMARY) {
|
||||
synchronized(this) {
|
||||
notifyList.add(msg)
|
||||
}
|
||||
}
|
||||
CallerMsgBoxListenerManager.invokeListener(MsgCategory.NOTICE, msg)
|
||||
}
|
||||
MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION -> {
|
||||
synchronized(this) {
|
||||
notifyList.add(msg)
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuTestNewObuRsiReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu_rsi" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -32,7 +32,9 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
}
|
||||
|
||||
override fun init(context: Context) {
|
||||
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress() + "--")
|
||||
//obu融合数据
|
||||
// MogoObuDcCombineManager.INSTANCE.init(context)
|
||||
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
|
||||
//bus乘客版本obu功能去掉
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
@@ -55,8 +57,6 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
CallerLogger.d("$M_OBU$TAG", "bus 司机 ipAddress = $ipAddress ---localIp = ${CommonUtils.getIpAddressString()}")
|
||||
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { //taxi 司机端和乘客端
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
@@ -69,7 +69,6 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
CallerLogger.d("$M_OBU$TAG", "taxi 司机端和乘客端 ipAddress = $ipAddress ---localIp = ${CommonUtils.getIpAddressString()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user