[add] 直播框VR适配

This commit is contained in:
liujing
2020-12-13 13:42:03 +08:00
parent bc861c6d68
commit 832ed39fcd
5 changed files with 93 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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 -> {