Merge branch 'vr' into dev_merge_shunyi_vr_map

This commit is contained in:
liujing
2020-12-09 11:50:12 +08:00
6 changed files with 118 additions and 71 deletions

View File

@@ -140,8 +140,8 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
public V2XRoadEventVH(ViewGroup viewGroup) {
super(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ?
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail, viewGroup, false) :
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail_vr, viewGroup, false)
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail_vr, viewGroup, false) :
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail, viewGroup, false)
);
init(itemView);
// 设置视图状态监听

View File

@@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.PagerSnapHelper;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
@@ -103,7 +104,8 @@ public class V2XRoadEventWindow extends RelativeLayout
private void initView(Context context) {
//Logger.d(MODULE_NAME, "V2X===初始化道路事件小窗口View。。。。。");
// 填充布局
LayoutInflater.from(context).inflate(R.layout.window_road_event_detail, this);
LayoutInflater.from(context).inflate(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ?
R.layout.window_road_event_detail_vr : R.layout.window_road_event_detail, this);
// 详情列表
mBtnCloseWindow = findViewById(R.id.btnCloseWindow);
// 详情列表

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="180"
android:endColor="#FF4944"
android:startColor="#C23632"/>
<corners android:bottomLeftRadius="@dimen/dp_20" />
</shape>

View File

@@ -3,70 +3,52 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_150"
android:background="@drawable/v2x_alert_window_bg"
app:roundLayoutRadius="@dimen/dp_30">
android:layout_height="@dimen/dp_120"
android:background="@drawable/v2x_bg_pop_up"
android:clipChildren="true"
app:roundLayoutRadius="@dimen/dp_20">
<com.mogo.module.v2x.view.RoundLayout
android:id="@+id/rlRoadEventImg"
android:layout_width="@dimen/dp_150"
android:layout_height="match_parent"
android:background="@color/v2x_555A_F5F5"
<com.mogo.service.imageloader.MogoImageView
android:id="@+id/ivEventImg"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:scaleType="fitXY"
android:src="@drawable/mogo_image_daolushigong_nor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:roundLayoutRadius="@dimen/dp_18">
<com.mogo.service.imageloader.MogoImageView
android:id="@+id/ivEventImg"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:scaleType="center"
app:miv_failureHolder="@drawable/v2x_icon_live_logo"
app:miv_overlayImageId="@drawable/v2x_icon_live_logo"
app:miv_placeHolder="@drawable/v2x_icon_live_logo" />
<ImageView
android:id="@+id/ivEventPlay"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:layout_centerInParent="true"
android:src="@drawable/v2x_icon_event_play"
android:visibility="gone" />
<TextView
android:id="@+id/tvEventTypeTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ivEventImg"
android:background="@drawable/bg_v2x_event_type_blue"
android:gravity="center"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_3"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_3"
android:textColor="#fff"
android:textSize="@dimen/module_v2x_event_type_title_text_size"
tools:text="道路施工" />
</com.mogo.module.v2x.view.RoundLayout>
app:miv_failureHolder="@drawable/v2x_icon_live_logo"
app:miv_overlayImageId="@drawable/v2x_icon_live_logo"
app:miv_placeHolder="@drawable/v2x_icon_live_logo" />
<ImageView
android:id="@+id/ivEventPlay"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:layout_centerInParent="true"
android:src="@drawable/v2x_icon_event_play"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvEventAddress"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_30"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/module_v2x_event_title_text_size"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/rlRoadEventImg"
app:layout_constraintStart_toEndOf="@+id/rlRoadEventImg"
app:layout_constraintTop_toTopOf="@+id/rlRoadEventImg"
tools:text="东城区北三环中路辅路小黄庄路口" />
android:id="@+id/tvEventTypeTitle"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_40"
android:layout_alignBottom="@+id/ivEventImg"
android:background="@drawable/bg_v2x_event_type_red_vr"
android:gravity="center"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_3"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_3"
android:textColor="#fff"
android:textSize="@dimen/module_v2x_event_type_title_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="道路施工" />
<ImageView
android:id="@+id/ivEventDistanceLogo"
@@ -122,6 +104,7 @@
app:miv_shapeBorderWidth="@dimen/dp_4" />
<LinearLayout
android:id="@+id/rightLinear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
@@ -132,8 +115,8 @@
<ImageView
android:id="@+id/ivEventLive"
android:layout_width="@dimen/module_v2x_event_button_size_detail"
android:layout_height="@dimen/module_v2x_event_button_size_detail"
android:layout_width="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_height="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_marginLeft="@dimen/dp_10"
android:padding="@dimen/dp_15"
android:src="@drawable/selector_live_btn"
@@ -144,8 +127,8 @@
<ImageView
android:id="@+id/ivEventReportTrue"
android:layout_width="@dimen/module_v2x_event_button_size_detail"
android:layout_height="@dimen/module_v2x_event_button_size_detail"
android:layout_width="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_height="@dimen/module_v2x_event_button_size_detail_vr"
android:padding="@dimen/dp_15"
android:scaleType="fitXY"
android:src="@drawable/v2x_selector_icon_report_true"
@@ -157,8 +140,8 @@
<ImageView
android:id="@+id/ivEventReportErr"
android:layout_width="@dimen/module_v2x_event_button_size_detail"
android:layout_height="@dimen/module_v2x_event_button_size_detail"
android:layout_width="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_height="@dimen/module_v2x_event_button_size_detail_vr"
android:padding="@dimen/dp_15"
android:src="@drawable/v2x_selector_icon_report_err"
android:visibility="gone"
@@ -169,8 +152,8 @@
<ImageView
android:id="@+id/ivEventCallChart"
android:layout_width="@dimen/module_v2x_event_button_size_detail"
android:layout_height="@dimen/module_v2x_event_button_size_detail"
android:layout_width="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_height="@dimen/module_v2x_event_button_size_detail_vr"
android:padding="@dimen/dp_15"
android:src="@drawable/selector_talk_btn"
android:visibility="gone"
@@ -181,8 +164,8 @@
<ImageView
android:id="@+id/ivEventEventNav"
android:layout_width="@dimen/module_v2x_event_button_size_detail"
android:layout_height="@dimen/module_v2x_event_button_size_detail"
android:layout_width="@dimen/module_v2x_event_button_size_detail_vr"
android:layout_height="@dimen/module_v2x_event_button_size_detail_vr"
android:padding="@dimen/dp_15"
android:src="@drawable/selector_nav_btn"
android:visibility="gone"
@@ -195,7 +178,6 @@
android:id="@+id/ivEventZan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/dp_15"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/ivEventLive"
app:layout_constraintStart_toEndOf="@id/ivEventEventNav"
@@ -204,4 +186,21 @@
</LinearLayout>
<TextView
android:id="@+id/tvEventAddress"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="4dp"
android:maxLines="2"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_40"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/rightLinear"
app:layout_constraintStart_toEndOf="@+id/ivEventImg"
app:layout_constraintTop_toTopOf="parent"
tools:text="东城区北三环中路辅路小黄庄路口当前位置属于测试数据,看一下换行" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvRoadEventList"
android:layout_width="match_parent"
android:layout_height="@dimen/module_v2x_event_window_height_vr"
android:minHeight="@dimen/module_v2x_event_window_height"
android:orientation="horizontal"
android:overScrollMode="never"
android:padding="@dimen/module_v2x_widow_top_gaps"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_v2x_event_detail_vr" />
<ImageView
android:id="@+id/btnCloseWindow"
android:layout_width="@dimen/dp_88"
android:layout_height="@dimen/dp_88"
android:layout_marginEnd="@dimen/dp_32"
android:layout_marginBottom="@dimen/dp_40"
android:background="@drawable/module_common_close_selector"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -88,6 +88,10 @@
<dimen name="module_v2x_event_button_size">98px</dimen>
<dimen name="module_v2x_event_button_size_detail">130px</dimen>
<!--适配 V2X 弹窗-VR-->
<dimen name="module_v2x_event_button_size_detail_vr">64px</dimen>
<dimen name="module_v2x_event_window_height_vr">120px</dimen>
<!--道路事件 高的弹窗-->
<dimen name="module_v2x_event_window_height">330px</dimen>
<dimen name="module_v2x_event_window_height_ground">450px</dimen>