[add] 直播框VR适配
This commit is contained in:
@@ -10,6 +10,7 @@ import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.scene.road.V2XRoadEventScenario;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XWindow;
|
||||
import com.mogo.module.v2x.utils.TrackUtils;
|
||||
@@ -38,7 +39,8 @@ public class V2XLiveVideoVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private V2XRoadEventEntity mV2XRoadEventEntity;
|
||||
|
||||
public V2XLiveVideoVH(ViewGroup viewGroup, IV2XWindow v2XWindow) {
|
||||
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_live_video, viewGroup, false), v2XWindow);
|
||||
super(LayoutInflater.from(viewGroup.getContext()).inflate(V2XServiceManager.getMoGoStatusManager().isVrMode() ?
|
||||
R.layout.item_v2x_live_video_vr : R.layout.item_v2x_live_video, viewGroup, false), v2XWindow);
|
||||
videoPlayer = itemView.findViewById(R.id.videoPlayer);
|
||||
ivReportHead = itemView.findViewById(R.id.ivReportHead);
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ public class V2XRoadLiveCarWindow extends V2XBasWindow
|
||||
private void initView(Context context) {
|
||||
//Logger.w(MODULE_NAME, "V2X===初始化道路直播视图");
|
||||
// 填充布局
|
||||
LayoutInflater.from(context).inflate(R.layout.item_v2x_road_live_car_detail, this);
|
||||
|
||||
LayoutInflater.from(context).inflate(V2XServiceManager.getMoGoStatusManager().isVrMode() ?
|
||||
R.layout.item_v2x_road_live_car_detail_vr : R.layout.item_v2x_road_live_car_detail, this);
|
||||
mTvEventStubClose = findViewById(R.id.tvEventStubClose);
|
||||
mRecyclerView = findViewById(R.id.rvRoadEventList);
|
||||
mTvEventStubClose.setOnClickListener(v -> {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:background="@drawable/v2x_bg_pop_up"
|
||||
android:paddingEnd="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
tools:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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"
|
||||
android:background="@drawable/v2x_bg_pop_up"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<com.mogo.module.v2x.view.V2XLiveGSYVideoView
|
||||
android:id="@+id/videoPlayer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/v2x_video_window_height_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundLayoutRadius="@dimen/dp_30" />
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivReportHead"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoPlayer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/videoPlayer"
|
||||
app:miv_borderColor="#4cffffff"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle"
|
||||
app:miv_shapeBorderWidth="@dimen/dp_4"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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:id="@+id/rlRoadEventDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_394"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvRoadEventList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="never"
|
||||
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_live_video_vr" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEventStubClose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:background="@drawable/bg_count_down"
|
||||
android:paddingLeft="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingRight="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:text="30s"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="@+id/rvRoadEventList"
|
||||
app:layout_constraintTop_toTopOf="@+id/rvRoadEventList" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_130"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@drawable/v2x_icon_event_live_top"
|
||||
app:layout_constraintStart_toStartOf="@+id/rvRoadEventList"
|
||||
app:layout_constraintTop_toTopOf="@+id/rvRoadEventList" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user