diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java index 2fefe935c1..fa111adadc 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingAdapter.java @@ -74,16 +74,11 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter() + private val mV2XScenarioHistoryFragment = V2XScenarioHistoryFragment() private val mV2XShareEventsFragment = V2XShareEventsFragment() private val mV2XSurroundingFragment = V2XSurroundingFragment() @@ -77,6 +101,11 @@ class V2XEventPanelFragment : MvpFragment try { @@ -120,6 +149,12 @@ class V2XEventPanelFragment : MvpFragment "封路" + MarkerPoiTypeEnum.FOURS_ICE -> "道路结冰" + MarkerPoiTypeEnum.FOURS_FOG -> "浓雾" + MarkerPoiTypeEnum.TRAFFIC_CHECK -> "交通检查" + MarkerPoiTypeEnum.FOURS_ACCIDENT -> "交通事故" + MarkerPoiTypeEnum.FOURS_BLOCK_UP -> "拥堵" + MarkerPoiTypeEnum.FOURS_ROAD_WORK -> "施工" + MarkerPoiTypeEnum.FOURS_PONDING -> "道路积水" + MarkerPoiTypeEnum.FOURS_LIVING -> "实时路况" + else -> "实时路况" + } + return typeName + } + private fun selectWithItem(item: Int) { when (item) { 0 -> { diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XSurroundingFragment.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XSurroundingFragment.java index a9d2cfd849..92ebcde361 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XSurroundingFragment.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XSurroundingFragment.java @@ -26,6 +26,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.alibaba.android.arouter.launcher.ARouter; +import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.mvp.MvpFragment; import com.mogo.commons.voice.AIAssist; import com.mogo.map.MogoLatLng; @@ -53,6 +54,8 @@ import com.mogo.service.MogoServicePaths; import com.mogo.utils.WorkThreadHandler; import com.mogo.utils.logger.Logger; +import org.greenrobot.eventbus.EventBus; + import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -82,14 +85,6 @@ public class V2XSurroundingFragment extends MvpFragment markerExploreWays = new ArrayList<>(); - - @Override protected int getLayoutId() { @@ -118,13 +113,6 @@ public class V2XSurroundingFragment extends MvpFragment 0) { AIAssist.getInstance(V2XUtils.getApp()). speakTTSVoice("为您找到周边以下事件请查看", null); @@ -323,99 +300,76 @@ public class V2XSurroundingFragment extends MvpFragment "); + } + + @Override + public void onAnimEnd() { + if (mogoMarker.isDestroyed()) { + return; + } + Logger.d(TAG, " onItemClickListener onAnimEnd ------> "); + mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null); + } + }); + mogoMarker.setOwner(markerShowEntity.getMarkerType()); + mogoMarker.setObject(markerShowEntity); + } + }, i * 100L); + } + + //自适应显示 + showBonndsRoadtion(exploreWayList); + } else { + Logger.e(TAG, "onItemClickListener exploreWayList == null"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } } } -// @Override -// public void onItemClickListener(View v, int position, SurroundingConstruction construction) { -// if (construction != null) { -// //卡片消失 -// V2XEventPanelFragment.Companion.getInstance().hidePanel(); -// //清除道路事件 -// V2XServiceManager.getMarkerManager().removeMarkers(ServiceConst.CARD_TYPE_ROAD_CONDITION); -// -// try { -// //处理 marker的显示 -// List exploreWayList = construction.getConstrutList(); -// Logger.d(TAG, "onItemClickListener exploreWayList.size() = " + exploreWayList.size()); -// if (exploreWayList != null && exploreWayList.size() > 0) { -// for (int i = 0; i < exploreWayList.size(); i++) { -// MarkerExploreWay exploreWay = exploreWayList.get(i); -// MarkerShowEntity markerShowEntity = new MarkerShowEntity(); -// markerShowEntity.setBindObj(exploreWay); -// markerShowEntity.setChecked(false); -// markerShowEntity.setTextContent(exploreWay.getAddr()); -// markerShowEntity.setMarkerLocation(exploreWay.getLocation()); -// markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_ROAD_CONDITION); -// -// WorkThreadHandler.getInstance().postDelayed(() -> { -// IMogoMarker mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity); -// // 点击监听,天际弹窗展示详情 -// if (mogoMarker != null) { -// mogoMarker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() { -// @Override -// public void onAnimStart() { -// Logger.d(TAG, " onItemClickListener onAnimStart -----> "); -// } -// -// @Override -// public void onAnimEnd() { -// if (mogoMarker.isDestroyed()) { -// return; -// } -// Logger.d(TAG, " onItemClickListener onAnimEnd ------> "); -// mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null); -// } -// }); -// mogoMarker.setOwner(markerShowEntity.getMarkerType()); -// mogoMarker.setObject(markerShowEntity); -// } -// }, i * 100L); -// } -// -// //自适应显示 -// showBonndsRoadtion(exploreWayList); -// } else { -// Logger.e(TAG, "onItemClickListener exploreWayList == null"); -// } -// } catch (Exception e) { -// e.printStackTrace(); -// } -// } -// } - - /** * 自适应显示 * diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/SurroundingItemClickListener.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/SurroundingItemClickListener.java index 83eef72f09..3ebf7bccf3 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/SurroundingItemClickListener.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/SurroundingItemClickListener.java @@ -10,5 +10,5 @@ import com.mogo.module.v2x.entity.panel.SurroundingConstruction; * @since 2020/8/10 */ public interface SurroundingItemClickListener { - void onItemClickListener(View v, int position, SurroundingConstruction construction, String poiType); + void onItemClickListener(View v, int position, SurroundingConstruction construction); } diff --git a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_event_list_item.xml b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_event_list_item.xml new file mode 100644 index 0000000000..d1f0a2354f --- /dev/null +++ b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_event_list_item.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_road_type.xml b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_road_type.xml new file mode 100644 index 0000000000..e789d681a3 --- /dev/null +++ b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_road_type.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml b/modules/mogo-module-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml index dca25c89b9..d335682a1c 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml @@ -5,201 +5,148 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + - - + - + android:layout_height="@dimen/module_v2x_surrounding_top_height" + android:visibility="visible"> + + + + + android:layout_width="@dimen/module_v2x_surrounding_top_bt_width" + android:layout_height="@dimen/module_v2x_surrounding_top_bt_height" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left" + android:background="@drawable/bg_v2x_refresh" + android:gravity="center"> + + + + + + + + + + + + + + + + - + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_below="@+id/tv_main_empty_2" + android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top"> + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml index 3753401c25..cf502b43fc 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml @@ -5,7 +5,7 @@ android:id="@+id/surrounding_root" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_v2x_event_list_item"> + android:background="@drawable/bg_v2x_surrounding_event_list_item"> + tools:text="小黄庄北街与北三环辅路交叉口" /> + tools:text="小蘑菇" /> @@ -51,14 +53,14 @@ android:id="@+id/surrounding_road_type" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/dp_36" - android:layout_marginTop="@dimen/dp_12" + android:layout_marginStart="20px" + android:layout_marginTop="6px" android:layout_marginBottom="@dimen/dp_36" android:background="@drawable/bg_v2x_event_type_read" android:gravity="center" - android:paddingLeft="5px" + android:paddingLeft="6px" android:paddingTop="3px" - android:paddingRight="5px" + android:paddingRight="6px" android:paddingBottom="3px" android:text="违章停车" android:textColor="#ffffff" diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_back_image_light.png b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_back_image_light.png new file mode 100644 index 0000000000..532c21499d Binary files /dev/null and b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_back_image_light.png differ diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_back_image_light.png b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_back_image_light.png new file mode 100644 index 0000000000..532c21499d Binary files /dev/null and b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_back_image_light.png differ diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable/bg_v2x_surrounding_event_list_item_light.xml b/skin/mogo-skin-light/src/main/module-v2x-res/drawable/bg_v2x_surrounding_event_list_item_light.xml new file mode 100644 index 0000000000..05f8c02d99 --- /dev/null +++ b/skin/mogo-skin-light/src/main/module-v2x-res/drawable/bg_v2x_surrounding_event_list_item_light.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file