From ffcf0ca35673c412a36ead0af928ea4d667f133f Mon Sep 17 00:00:00 2001 From: wujifei Date: Wed, 7 Apr 2021 18:06:19 +0800 Subject: [PATCH] =?UTF-8?q?new#=E4=BC=98=E5=8C=96Vr=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E9=81=93=E8=B7=AF=E4=BA=8B=E4=BB=B6UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2x/adapter/holder/V2XRoadEventVH.java | 8 +- .../mogo/module/v2x/utils/EventTypeUtils.java | 2 +- .../src/main/res/drawable-xhdpi/icon_play.png | Bin 0 -> 847 bytes .../main/res/layout/item_v2x_event_detail.xml | 78 ++++++++++++++++++ .../res/layout/item_v2x_event_detail_vr.xml | 38 ++++++--- 5 files changed, 112 insertions(+), 14 deletions(-) create mode 100644 modules/mogo-module-v2x/src/main/res/drawable-xhdpi/icon_play.png diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventVH.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventVH.java index 8e5b8b24e1..fe7e4d093f 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventVH.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventVH.java @@ -143,6 +143,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder { private MogoImageView ivEvent; private TextView tvEvent; + private ImageView ivPlay; private TextView tvLine; private TextView tvPlay; @@ -163,6 +164,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder { ivEvent = itemView.findViewById(R.id.iv_event); tvEvent = itemView.findViewById(R.id.tv_event); + ivPlay = itemView.findViewById(R.id.iv_play); tvLine = itemView.findViewById(R.id.tv_line); tvPlay = itemView.findViewById(R.id.tv_play); } @@ -248,6 +250,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder { ivEventImg.setOnClickListener(v -> { showRoadVideoInfo(v2XEventShowEntity); }); + ivPlay.setVisibility(VISIBLE); tvLine.setVisibility(VISIBLE); tvPlay.setVisibility(VISIBLE); tvPlay.setOnClickListener(v -> { @@ -261,6 +264,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder { ivEventImg.setOnClickListener(null); ivEventPlay.setOnClickListener(null); ivEventPlay.setVisibility(GONE); + ivPlay.setVisibility(GONE); tvLine.setVisibility(GONE); tvPlay.setVisibility(GONE); } @@ -279,11 +283,11 @@ public class V2XRoadEventVH extends V2XBaseViewHolder { } ivEvent.setImageResource(EventTypeUtils.getPoiTypeSrcVr(mNoveltyInfo.getPoiType())); tvEvent.setText(EventTypeUtils.getPoiTypeStrVr(mNoveltyInfo.getPoiType())); - if (mNoveltyInfo.getPoiType() == V2XPoiTypeEnum.FOURS_FOG) { + if (V2XPoiTypeEnum.FOURS_FOG.equals(mNoveltyInfo.getPoiType())) { V2XServiceManager.getDisplayEffectsManager().displayEffects(V2XPoiTypeEnum.FOURS_FOG); // MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(ALERT_THE_FRONT_CRASH_WARNING_TOP, MogoReceiver.ACTION_V2X_FRONT_WARNING); } - tvEventAddress.setText(mNoveltyInfo.getAddr()); + tvEventAddress.setText(mNoveltyInfo.getAddr()); tvEventDistance.setText("距离 " + (int) mNoveltyInfo.getDistance() + "米"); Calendar c = Calendar.getInstance(); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/EventTypeUtils.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/EventTypeUtils.java index ad2838ce84..c8d2e6b766 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/EventTypeUtils.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/EventTypeUtils.java @@ -135,7 +135,7 @@ public class EventTypeUtils { break; // 积水 case V2XPoiTypeEnum.FOURS_PONDING: - str = "前方道路积水道路积水"; + str = "前方道路积水"; break; // 浓雾 case V2XPoiTypeEnum.FOURS_FOG: diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/icon_play.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/icon_play.png new file mode 100644 index 0000000000000000000000000000000000000000..b38e732923807b71918da578a91600d53c308b73 GIT binary patch literal 847 zcmV-V1F-ywP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR919-spN1ONa40RR916aWAK0D$o?qyPW{xk*GpR7eedR?lk_VGzx?jVVD) zF)5;8(1Sm2R;XL+hcS2T$JgrcLo6BAz_N9*QU) zL`*Qjv_cArjq^VDh1qfI!0gPtdGqGmB;Bn`h;_T&K?zghC&jbked12VK-J6%)eT)cAp z$g!cJ#l_`ZIAa$;i;Hwm>+h#H??5*>M2@dNeg2YewYK`EXJ!u-uiiLZuQxEOImltL z^C2ENnH}aKD8fE!Z!cc14vd~Ye{`k%YPSIFbB+;Q^w{?~F52Qw$szD8KT)mLc1;$q z=WkEX4z}Cvo#uhVIPWN`BT0zBtr!F%CV!G{>EUwr?72(%_4SXbut`lj?{O`x32`|4 zk)^t*RMz^(E?hp)Y;NLvhjHc~Jpzm*A`)XH<`s9kI8C2Lj%+!sw~i<3~&NeE#6JfaIYMJs6io^hso76SZ~-{N>221w}HM?B1EV z)hMq#{~j*oEF$%&ff0>4+;Id@wH5Ni6XRo>l@Dv_`TKJ}3Wbrj;#-~Ad5DMwcr8AY z1n*-I`S_yC%|ZNJI5M4emXxT9}eWVQj_GScv&3(p70KJgaB$7au{kY%$!_1UlsmS@nPBd Z^$%19bA&!gWxfCa002ovPDHLkV1fm$a<~8h literal 0 HcmV?d00001 diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml index bc25522ee9..435eb8b454 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml @@ -205,4 +205,82 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file 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 ac91f6c608..ae2ab6d8bb 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 @@ -229,28 +229,44 @@ android:id="@+id/iv_event" android:layout_width="@dimen/dp_100" android:layout_height="@dimen/dp_100" + android:layout_marginLeft="@dimen/dp_30" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:layout_marginLeft="@dimen/dp_30" app:miv_failureHolder="@drawable/v2x_icon_live_logo" app:miv_overlayImageId="@drawable/v2x_icon_live_logo" app:miv_placeHolder="@drawable/v2x_icon_live_logo" app:miv_topLeftRadius="@dimen/dp_20" /> - + app:layout_constraintTop_toTopOf="parent"> + + + + + +