Merge branch 'vr' into dev_merge_shunyi_vr_map

This commit is contained in:
liujing
2020-12-09 15:11:11 +08:00
12 changed files with 60 additions and 16 deletions

View File

@@ -1,5 +1,7 @@
package com.mogo.module.v2x;
import com.mogo.module.common.MogoApisHandler;
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
@@ -131,4 +133,9 @@ public class V2XConst {
* 绿波车速marker
*/
public static final String V2X_OPTIMAL_SPEED_MARKER = "V2X_OPTIMAL_SPEED_MARKER";
/*
* VR模式
* */
public static final boolean VR_MODE = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode();
}

View File

@@ -9,6 +9,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerUserInfo;
@@ -31,6 +32,7 @@ import java.util.Locale;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static com.mogo.module.v2x.V2XConst.VR_MODE;
/**
* e-mail : 1358506549@qq.com
@@ -194,7 +196,9 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
.append("" + (int) mV2XPushMessageEntity.getDistance())
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
.append("")
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
.setFontSize((int) itemView.getResources().getDimension(
VR_MODE ?
R.dimen.module_v2x_event_distance_title_vr : R.dimen.module_v2x_event_distance_title))
.create();
}
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.CHINA);

View File

@@ -45,6 +45,7 @@ import java.util.List;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
import static com.mogo.module.v2x.V2XConst.VR_MODE;
/**
* author : donghongyu
@@ -139,7 +140,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
}
public V2XRoadEventVH(ViewGroup viewGroup) {
super(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ?
super(VR_MODE ?
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)
);

View File

@@ -36,6 +36,7 @@ import java.util.List;
import static com.mogo.module.common.entity.MarkerPoiTypeEnum.FOURS_BLOCK_UP;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
import static com.mogo.module.v2x.V2XConst.VR_MODE;
/**
* author : donghongyu
@@ -104,7 +105,7 @@ public class V2XRoadEventWindow extends RelativeLayout
private void initView(Context context) {
//Logger.d(MODULE_NAME, "V2X===初始化道路事件小窗口View。。。。。");
// 填充布局
LayoutInflater.from(context).inflate(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ?
LayoutInflater.from(context).inflate(VR_MODE ?
R.layout.window_road_event_detail_vr : R.layout.window_road_event_detail, this);
// 详情列表
mBtnCloseWindow = findViewById(R.id.btnCloseWindow);

View File

@@ -7,6 +7,8 @@ import com.mogo.module.v2x.R;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.utils.logger.Logger;
import static com.mogo.module.v2x.V2XConst.VR_MODE;
/**
* @ProjectName: MoGoModulSafeDriving
* @Package: com.mogo.module.v2x.utils
@@ -101,7 +103,7 @@ public class EventTypeUtils {
case V2XPoiTypeEnum.FOURS_BLOCK_UP: // 拥堵
case V2XPoiTypeEnum.FOURS_LIVING: // 实时路况
case V2XPoiTypeEnum.FOURS_NEALY: // 身边
strBg = R.drawable.bg_v2x_event_type_orange;
strBg = VR_MODE ? R.drawable.bg_v2x_event_type_orange_vr : R.drawable.bg_v2x_event_type_orange;
break;
case V2XPoiTypeEnum.TRAFFIC_CHECK:// 交通检查
case V2XPoiTypeEnum.ROAD_CLOSED:// 封路
@@ -110,10 +112,10 @@ public class EventTypeUtils {
case V2XPoiTypeEnum.FOURS_FOG: // 浓雾
case V2XPoiTypeEnum.FOURS_ICE: // 结冰
case V2XPoiTypeEnum.FOURS_ACCIDENT: // 事故
strBg = R.drawable.bg_v2x_event_type_read;
strBg = VR_MODE ? R.drawable.bg_v2x_event_type_red_vr : R.drawable.bg_v2x_event_type_read;
break;
default:
strBg = R.drawable.bg_v2x_event_type_read;
strBg = VR_MODE ? R.drawable.bg_v2x_event_type_red_vr : R.drawable.bg_v2x_event_type_read;
break;
}
return strBg;

View File

@@ -14,6 +14,8 @@ import androidx.annotation.Nullable;
import com.mogo.module.v2x.R;
import static com.mogo.module.v2x.V2XConst.VR_MODE;
/**
* 红心点赞按钮控件
*
@@ -44,7 +46,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
inflate(context, R.layout.view_heart_like_gray_back, this);
mIllegalParkingLike = findViewById(R.id.ivLikeForGrayBack);
} else {
inflate(context, R.layout.view_heart_like, this);
inflate(context, VR_MODE ? R.layout.view_heart_like_vr : R.layout.view_heart_like, this);
mIllegalParkingLike = findViewById(R.id.ivIllegalParkingLike);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/v2x_event_icon_live_press" android:state_pressed="true" />
<item android:drawable="@drawable/v2x_event_icon_live_vr" android:state_pressed="false" />
<item android:drawable="@drawable/v2x_event_icon_live_vr" />
</selector>

View File

@@ -13,24 +13,26 @@
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:miv_bottomLeftRadius="@dimen/dp_20"
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_placeHolder="@drawable/v2x_icon_live_logo"
app:miv_topLeftRadius="@dimen/dp_20" />
<ImageView
android:id="@+id/ivEventPlay"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
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" />
app:layout_constraintBottom_toBottomOf="@id/ivEventImg"
app:layout_constraintEnd_toEndOf="@id/ivEventImg"
app:layout_constraintStart_toStartOf="@id/ivEventImg"
app:layout_constraintTop_toTopOf="@id/ivEventImg" />
<TextView
android:id="@+id/tvEventTypeTitle"
@@ -107,6 +109,7 @@
android:id="@+id/rightLinear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_30"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
@@ -119,7 +122,7 @@
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"
android:src="@drawable/selector_live_btn_vr"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -178,6 +181,7 @@
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"

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llIllegalParkingLike"
android:layout_width="@dimen/module_v2x_event_button_size_vr"
android:layout_height="@dimen/module_v2x_event_button_size_vr"
android:background="@drawable/icon_heart_like_bg"
android:gravity="center">
<ImageView
android:id="@+id/ivIllegalParkingLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_heart_like_vr" />
</LinearLayout>

View File

@@ -89,8 +89,9 @@
<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_button_size_detail_vr">80px</dimen>
<dimen name="module_v2x_event_window_height_vr">120px</dimen>
<dimen name="module_v2x_event_button_size_vr">64px</dimen>
<!--道路事件 高的弹窗-->
<dimen name="module_v2x_event_window_height">330px</dimen>
@@ -112,6 +113,8 @@
<dimen name="module_v2x_event_panel_in_launcher_btn_x">940px</dimen>
<dimen name="module_v2x_event_panel_btn_y">701px</dimen>
<dimen name="module_v2x_event_distance_title_vr">32px</dimen>
<!--适配直播框-->
<dimen name="v2x_right_context_margin">830px</dimen>
<dimen name="v2x_video_window_height_content">664px</dimen>