[add] v2x弹框UI MogoImageView缺少圆角设置

This commit is contained in:
liujing
2020-12-09 15:10:37 +08:00
parent 3a3236458d
commit f9a172f5c1
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);
}