new#优化Vr模式下道路事件UI
This commit is contained in:
@@ -143,6 +143,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
private MogoImageView ivEvent;
|
||||
private TextView tvEvent;
|
||||
private ImageView ivPlay;
|
||||
private TextView tvLine;
|
||||
private TextView tvPlay;
|
||||
|
||||
@@ -163,6 +164,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
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<V2XEventShowEntity> {
|
||||
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<V2XEventShowEntity> {
|
||||
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<V2XEventShowEntity> {
|
||||
}
|
||||
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();
|
||||
|
||||
@@ -135,7 +135,7 @@ public class EventTypeUtils {
|
||||
break;
|
||||
// 积水
|
||||
case V2XPoiTypeEnum.FOURS_PONDING:
|
||||
str = "前方道路积水道路积水";
|
||||
str = "前方道路积水";
|
||||
break;
|
||||
// 浓雾
|
||||
case V2XPoiTypeEnum.FOURS_FOG:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 847 B |
@@ -205,4 +205,82 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:background="@drawable/bg_v2x_event_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
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"
|
||||
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" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_event"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_event"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_event"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="@dimen/dp_480"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:src="@drawable/icon_play"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_line"
|
||||
android:layout_width="@dimen/dp_0_5"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:background="@color/v2x_white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_play"
|
||||
app:layout_constraintStart_toEndOf="@+id/ll_event"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:text="播放"
|
||||
android:textColor="@color/v2x_event_play_text"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_event"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_event"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="@dimen/dp_480"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_event"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_event"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="@dimen/dp_480"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/dp_32" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/icon_play" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_line"
|
||||
@@ -260,7 +276,7 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_play"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_event"
|
||||
app:layout_constraintStart_toEndOf="@+id/ll_event"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
@@ -271,9 +287,9 @@
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:text="播放"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/v2x_event_play_text"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user