diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java index 473a491c0a..c655a5d009 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java @@ -190,6 +190,11 @@ public class EntranceFragment extends MvpFragment { - private static final String TAG = "liyz"; + private static final String TAG = "CameraLiveNoticeHelper"; private Context mContext; private static IMogoMarker mMogoMarker; private CloudRoadData mCloudRoadData; @@ -84,22 +84,23 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid()); + Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid()); if (TextUtils.equals(mCurrentUuid, mCloudRoadData.getUuid())) { if (isVrMode == isVrModeMarker) { // do nothing. + Log.e(TAG, "-------------1------------"); } else { if (isVrMode) { addVrCameraMarker(mCloudRoadData); isVrModeMarker = true; + Log.d(TAG, "-------------2------------"); } else { addNormalCameraMarker(mCloudRoadData); + Log.d(TAG, "-------------3------------"); isVrModeMarker = false; } } } else { - Logger.d(TAG, "mCurrentUuid != ----------"); mCurrentUuid = mCloudRoadData.getUuid(); if (isVrMode) { + Log.d(TAG, "-------------4------------"); addVrCameraMarker(mCloudRoadData); isVrModeMarker = true; } else { + Log.d(TAG, "-------------5------------"); addNormalCameraMarker(mCloudRoadData); isVrModeMarker = false; } diff --git a/modules/mogo-module-extensions/src/main/res/values/dimens.xml b/modules/mogo-module-extensions/src/main/res/values/dimens.xml index ea9ab4a5eb..0b834a7848 100644 --- a/modules/mogo-module-extensions/src/main/res/values/dimens.xml +++ b/modules/mogo-module-extensions/src/main/res/values/dimens.xml @@ -88,7 +88,7 @@ 1058px - 760px + 822px 700px 544px 117px diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java index 6acb0415ac..084475dd0d 100644 --- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java +++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java @@ -150,7 +150,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { mPauseImage = mWindowView.findViewById(R.id.window_play_pause_new); if (mPauseImage != null) { - mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause); + mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new); } int yPos = @@ -294,7 +294,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { if( mMediaInfoData.getPlayState() == MusicConstant.PLAY_STATE_PLAYING) { // kw音乐做的容错 if (mPauseImage != null) { - mPauseImage.setImageResource(R.drawable.module_media_window_pop_play); + mPauseImage.setImageResource(R.drawable.module_media_window_pop_play_new); } if (mAnimCircleImageView != null) { mAnimCircleImageView.startAnim(); @@ -314,7 +314,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { // GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(new SkinAbleBitmapTarget(mCircleImg, options)); }else{ Logger.e(TAG, "mMediaInfoData == null "); - mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img); + mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img_new); } } } else { @@ -371,7 +371,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { updateWindowUI(false); if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { if (mPauseImage != null) { - mPauseImage.setImageResource(R.drawable.module_media_window_pop_play); + mPauseImage.setImageResource(R.drawable.module_media_window_pop_play_new); } if (mAnimCircleImageView != null) { @@ -396,7 +396,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { Log.d(TAG, "onMusicPause: ===" + mMediaInfoData); if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { if (mPauseImage != null) { - mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause); + mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new); } if (mAnimCircleImageView != null) { @@ -421,7 +421,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener { Log.d(TAG, "onMusicStopped===" + mMediaInfoData); if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { if (mPauseImage != null) { - mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause); + mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new); } if (mAnimCircleImageView != null) { diff --git a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img_new.png b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img_new.png new file mode 100644 index 0000000000..fcc9015490 Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_default_music_img_new.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_pause_new.png b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_pause_new.png new file mode 100644 index 0000000000..86f936f702 Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_pause_new.png differ diff --git a/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_play_new.png b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_play_new.png new file mode 100644 index 0000000000..78e5680e91 Binary files /dev/null and b/modules/mogo-module-media/src/main/res/drawable-xhdpi/module_media_window_pop_play_new.png differ diff --git a/modules/mogo-module-media/src/main/res/layout/module_media_music_window_alert_layout_new.xml b/modules/mogo-module-media/src/main/res/layout/module_media_music_window_alert_layout_new.xml index d36414c4b7..606fb00f07 100644 --- a/modules/mogo-module-media/src/main/res/layout/module_media_music_window_alert_layout_new.xml +++ b/modules/mogo-module-media/src/main/res/layout/module_media_music_window_alert_layout_new.xml @@ -32,7 +32,8 @@ android:id="@+id/window_circle_img_new" android:layout_width="@dimen/module_media_pop_window_anim_img_size_new" android:layout_height="@dimen/module_media_pop_window_anim_img_size_new" - android:src="@drawable/module_media_default_music_img" + android:src="@drawable/module_media_default_music_img_new" + android:scaleType="fitCenter" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" @@ -43,7 +44,7 @@ android:layout_width="@dimen/module_media_pop_window_pause" android:layout_height="@dimen/module_media_pop_window_pause" android:background="@drawable/module_media_play_bg_selector" - android:src="@drawable/module_media_window_pop_play" + android:src="@drawable/module_media_window_pop_play_new" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" diff --git a/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml index f9fba40b16..75bfb5e9d1 100644 --- a/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-media/src/main/res/values-xhdpi/dimens.xml @@ -71,7 +71,7 @@ 80px 101px 60px - 116px + 115px 230px 14px 35px diff --git a/modules/mogo-module-media/src/main/res/values/colors.xml b/modules/mogo-module-media/src/main/res/values/colors.xml index b6ca26aca2..7c39678a81 100644 --- a/modules/mogo-module-media/src/main/res/values/colors.xml +++ b/modules/mogo-module-media/src/main/res/values/colors.xml @@ -3,5 +3,7 @@ #fff #7affffff #444E6E - #80ffffff + #f6ffffff + #1Affffff + #ffffff diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java index 3c8676cefa..2fefdb0e72 100644 --- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java +++ b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java @@ -3,7 +3,6 @@ package com.mogo.module.small.map; import android.content.Context; import android.graphics.BitmapFactory; import android.util.AttributeSet; -import android.util.Log; import android.view.LayoutInflater; import android.view.animation.LinearInterpolator; import android.widget.ImageView; @@ -15,21 +14,13 @@ import com.amap.api.location.AMapLocationClientOption; import com.amap.api.maps.AMap; import com.amap.api.maps.CameraUpdate; import com.amap.api.maps.CameraUpdateFactory; -import com.amap.api.maps.TextureMapView; import com.amap.api.maps.UiSettings; -import com.amap.api.maps.model.BitmapDescriptor; -import com.amap.api.maps.model.BitmapDescriptorFactory; import com.amap.api.maps.model.CameraPosition; -import com.amap.api.maps.model.CustomMapStyleOptions; import com.amap.api.maps.model.MyLocationStyle; import com.amap.api.navi.AMapNaviView; import com.amap.api.navi.AMapNaviViewOptions; import com.mogo.module.common.view.RoundLayout; import com.mogo.module.small.map.animation.DirectionRotateAnimation; -import com.mogo.module.small.map.utils.MapAssetStyleUtils; - -import java.io.IOException; -import java.io.InputStream; /** * 小地图的方向View @@ -71,9 +62,20 @@ public class SmallMapDirectionView extends RoundLayout { mIvMapBorder = findViewById(R.id.ivMapBorder); mAMapNaviView = findViewById(R.id.aMapNaviView); mAMapNaviView.onCreate(null); + // 车头朝上 mAMapNaviView.setNaviMode(AMapNaviView.CAR_UP_MODE); + // 设置电子眼所在路线的可见性 + mAMapNaviView.setRouteOverlayVisible(false); mAMap = mAMapNaviView.getMap(); + // 关闭地图文字标注 + mAMap.showMapText(false); + // 设置地图的样式 + mUiSettings = mAMap.getUiSettings(); + mUiSettings.setZoomControlsEnabled(false);// 地图缩放级别的交换按钮 + mUiSettings.setAllGesturesEnabled(false);// 所有手势 + mUiSettings.setMyLocationButtonEnabled(false); // 显示默认的定位按钮 + mUiSettings.setLogoBottomMargin(-150); //设置Logo下边界距离屏幕底部的边距,设置为负值即可 // 导航地图 AMapNaviViewOptions options = mAMapNaviView.getViewOptions(); @@ -95,8 +97,6 @@ public class SmallMapDirectionView extends RoundLayout { R.drawable.icon_module_small_map_four_corners)); // 设置指南针图标否在导航界面显示,默认显示。true,显示;false,隐藏。 options.setCompassEnabled(false); - // 黑夜模式 - options.setNaviNight(true); //设置路况光柱条是否显示(只适用于驾车导航,需要联网)。 options.setTrafficBarEnabled(false); // 设置[实时交通图层开关按钮]是否显示(只适用于驾车导航,需要联网)。 @@ -137,27 +137,17 @@ public class SmallMapDirectionView extends RoundLayout { //options.setPointToCenter(0.7D, 0.5D); // 2D模式 options.setTilt(0); + // 黑夜模式 + options.setNaviNight(true); + // 自定义地图样式 +// options.setCustomMapStylePath("/mnt/sdcard/amap/style.data"); mAMapNaviView.setViewOptions(options); } - // 设置电子眼所在路线的可见性 - mAMapNaviView.setRouteOverlayVisible(false); - // 设置是否隐藏AMapNaviView上的CarOverlay,包括自车、罗盘 - mAMapNaviView.setCarOverlayVisible(true); - mAMapNaviView.setViewOptions(options); //设置希望展示的地图缩放级别 mCameraUpdate = CameraUpdateFactory.zoomTo(12); mAMap.moveCamera(mCameraUpdate); - // 设置当前位置的样式 -// myLocationStyle = new MyLocationStyle();//初始化定位蓝点样式类 -// myLocationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE);//连续定位、且将视角移动到地图中心点,定位点依照设备方向旋转,并且会跟随设备移动。(1秒1次定位)如果不设置myLocationType,默认也会执行此种模式。 -// myLocationStyle.interval(1000); //设置连续定位模式下的定位间隔,只在连续定位模式下生效,单次定位模式下不会生效。单位为毫秒。 -// BitmapDescriptor location = BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo); -// myLocationStyle.myLocationIcon(location); -// mAMap.setMyLocationStyle(myLocationStyle);//设置定位蓝点的Style -// mAMap.setMyLocationEnabled(true);// 设置为true表示启动显示定位蓝点,false表示隐藏定位蓝点并不进行定位,默认是false。 - mAMap.setOnCameraChangeListener(new AMap.OnCameraChangeListener() { @Override public void onCameraChange(CameraPosition cameraPosition) { @@ -173,22 +163,20 @@ public class SmallMapDirectionView extends RoundLayout { } }); - // 关闭地图文字标注 - mAMap.showMapText(false); +// CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions(); +// customMapStyleOptions.setStyleData(MapAssetStyleUtils.getAssetsStyle(context)); +// customMapStyleOptions.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(context)); +// customMapStyleOptions.setEnable(true); +// mAMap.setCustomMapStyle(customMapStyleOptions); - // 设置地图的样式 - mUiSettings = mAMap.getUiSettings(); - mUiSettings.setZoomControlsEnabled(false);// 地图缩放级别的交换按钮 - mUiSettings.setAllGesturesEnabled(false);// 所有手势 - mUiSettings.setMyLocationButtonEnabled(false); // 显示默认的定位按钮 - mUiSettings.setLogoBottomMargin(-150); //设置Logo下边界距离屏幕底部的边距,设置为负值即可 - - - CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions(); - customMapStyleOptions.setStyleData(MapAssetStyleUtils.getAssetsStyle(context)); - customMapStyleOptions.setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(context)); - customMapStyleOptions.setEnable(true); - mAMap.setCustomMapStyle(customMapStyleOptions); + // 设置当前位置的样式 +// myLocationStyle = new MyLocationStyle();//初始化定位蓝点样式类 +// myLocationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE);//连续定位、且将视角移动到地图中心点,定位点依照设备方向旋转,并且会跟随设备移动。(1秒1次定位)如果不设置myLocationType,默认也会执行此种模式。 +// myLocationStyle.interval(1000); //设置连续定位模式下的定位间隔,只在连续定位模式下生效,单次定位模式下不会生效。单位为毫秒。 +// BitmapDescriptor location = BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo); +// myLocationStyle.myLocationIcon(location); +// mAMap.setMyLocationStyle(myLocationStyle);//设置定位蓝点的Style +// mAMap.setMyLocationEnabled(true);// 设置为true表示启动显示定位蓝点,false表示隐藏定位蓝点并不进行定位,默认是false。 } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java index b0c1ef448d..425e390239 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java @@ -243,6 +243,11 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { roadEventEntity.setLocation(markerLocation); roadEventEntity.setBindObj(v2XMarkerEntity); + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); + markerShowEntity.setBindObj(v2XMarkerEntity); + markerShowEntity.setChecked(false); + markerShowEntity.setMarkerLocation(markerLocation); + // 重置告警信息 V2XServiceManager.getV2XStatusManager().setAlarmInfo(roadEventEntity); @@ -263,8 +268,14 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity)); optionsRipple.period(1); } - - mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); + if (V2XServiceManager.getMoGoStatusManager().isVrMode()) { + mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null); + mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions())); + mAlarmInfoMarker.showInfoWindow(); + } else{ + optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity)); + mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); + } // 当前Marker设置为最上面 mAlarmInfoMarker.setToTop(); // 绘制连接线 @@ -559,10 +570,9 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { mAlarmInfoMarker.showInfoWindow(); } else { IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(context, markerShowEntity, optionsRipple); - Bitmap bitmap = ViewUtils.fromView(iMarkerView.getView()); - optionsRipple.icon(bitmap); - IMogoMarkerManager i = V2XServiceManager.getMarkerManager(); + optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity)); mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); + mAlarmInfoMarker.setMarkerIconView((IMogoMarkerIconViewCreator) iMarkerView); } // 当前Marker设置为最上面 mAlarmInfoMarker.setToTop(); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java index a0e383bb30..a0a548676b 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java @@ -1,5 +1,6 @@ package com.mogo.module.v2x.scenario.scene.park; +import android.content.Context; import android.graphics.Bitmap; import android.os.Handler; import android.view.animation.AccelerateInterpolator; @@ -15,15 +16,20 @@ import com.mogo.module.common.drawer.marker.MapMarkerAdapter; import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerShowEntity; +import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.service.ServiceConst; import com.mogo.module.v2x.V2XServiceManager; +import com.mogo.module.v2x.marker.V2XMarkerAdapter; import com.mogo.module.v2x.scenario.view.IV2XMarker; import com.mogo.module.v2x.utils.MarkerUtils; import com.mogo.utils.ViewUtils; import com.mogo.utils.WorkThreadHandler; + import java.util.ArrayList; import java.util.List; + import static com.mogo.module.v2x.V2XConst.MODULE_NAME; +import static com.mogo.module.v2x.V2XConst.V2X_EVENT_ALARM_POI; /** * author : donghongyu @@ -66,6 +72,11 @@ public class V2XIllegalParkMarker implements IV2XMarker> markerShowEntity.setMarkerLocation(markerExploreWay.getLocation()); markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY); + // 进行数据转换,用于Marker展示 + V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity(); + roadEventEntity.setLocation(markerExploreWay.getLocation()); + roadEventEntity.setBindObj(markerExploreWay); + WorkThreadHandler.getInstance().postDelayed(() -> { IMogoMarker mogoMarker; if (V2XServiceManager.getMoGoStatusManager().isVrMode()) { @@ -76,7 +87,7 @@ public class V2XIllegalParkMarker implements IV2XMarker> IMarkerView markerView = MapMarkerAdapter.getMarkerView(AbsMogoApplication.getApp(), markerShowEntity, optionsRipple); Bitmap bitmap = ViewUtils.fromView(markerView.getView()); optionsRipple.icon(bitmap); - mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity); + mogoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); } // 点击监听,天际弹窗展示详情 if (mogoMarker != null) { diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java index 7777ae5c59..9750889c69 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java @@ -57,6 +57,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout { private Button mBtnTriggerCallUserInfo; private Button mBtnTriggerEventUgc; private Button mBtnTriggerTrafficSearch; + private Button nBtnTriggerVR; private Button btnTriggerRearVIPCarTip, btnTriggerVehicleBrakes, @@ -116,6 +117,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout { mBtnTriggerEventUgc = findViewById(R.id.btnTriggerEventUgc); mBtnTriggerCallUserInfo = findViewById(R.id.btnTriggerCallUserInfo); mBtnTriggerTrafficSearch = findViewById(R.id.btnTriggerTrafficSearch); + nBtnTriggerVR = findViewById(R.id.btnTriggerVR); switch (showType) { case 0: @@ -130,6 +132,12 @@ public class V2XTestConsoleWindow extends ConstraintLayout { break; } + nBtnTriggerVR.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + V2XServiceManager.getMoGoStatusManager().setVrMode("nBtnTriggerVR", true); + } + }); btnTriggerRearVIPCarTip = findViewById(R.id.btnTriggerRearVIPCarTip); btnTriggerVehicleBrakes = findViewById(R.id.btnTriggerVehicleBrakes); @@ -167,7 +175,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout { mogoDriverInfo.setSn("12345678"); mogoDriverInfo.setUserName("测试"); mogoDriverInfo.setUserHead("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600872867592&di=994e371880ca6ae2814f553e0d0e4139&imgtype=0&src=http%3A%2F%2Fp3.ssl.cdn.btime.com%2Ft014c5d8a1e5cef12ba.jpg%3Fsize%3D506x543"); - if ( V2XServiceManager.getCarsChattingProvider() != null ) { + if (V2XServiceManager.getCarsChattingProvider() != null) { V2XServiceManager.getCarsChattingProvider().showUserWindow("CAR_CALL_USER_TO_" + V2XConst.MODULE_NAME, mogoDriverInfo, context); } }); @@ -267,7 +275,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout { LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent); }); - mBtnTriggerTrafficSearch.setOnClickListener(v-> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus()); + mBtnTriggerTrafficSearch.setOnClickListener(v -> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus()); /* diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_tip_bg.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_tip_bg.png new file mode 100644 index 0000000000..22404daa42 Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_tip_bg.png differ diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml index 79822a5547..847361a586 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml @@ -2,20 +2,20 @@ + android:layout_width="@dimen/dp_822" + android:layout_height="@dimen/dp_182" + android:background="@drawable/v2x_tip_bg" + android:clipChildren="true"> \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml index f4c376b7ad..df06979f90 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml @@ -2,24 +2,26 @@ @@ -34,11 +37,11 @@ + android:background="@drawable/v2x_tip_bg"> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.409" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.463" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.463" /> diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_road_event_detail_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/window_road_event_detail_vr.xml index e3f3c2d6c6..4411a57baf 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/window_road_event_detail_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/window_road_event_detail_vr.xml @@ -2,8 +2,8 @@ +