Merge branch 'vr' into dev_merge_shunyi_vr_map
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -8,6 +9,8 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
@@ -25,6 +28,7 @@ import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.imageloader.MogoImageView;
|
||||
import com.mogo.utils.glide.GlideRoundedCornersTransform;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -44,6 +48,7 @@ import static com.mogo.module.v2x.V2XConst.VR_MODE;
|
||||
*/
|
||||
public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
private Context mContext;
|
||||
private MogoImageView ivHead;
|
||||
private TextView tvName;
|
||||
private TextView tvDistance;
|
||||
@@ -73,6 +78,7 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
public V2XOtherSeekHelpVH(ViewGroup viewGroup) {
|
||||
super(LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(VR_MODE ? R.layout.item_v2x_fault_help_vr : R.layout.item_v2x_fault_help, viewGroup, false));
|
||||
mContext = viewGroup.getContext();
|
||||
ivHead = itemView.findViewById(R.id.ivFaultHelpHead);
|
||||
tvName = itemView.findViewById(R.id.tvFaultHelpName);
|
||||
tvDistance = itemView.findViewById(R.id.tvFaultHelpDistance);
|
||||
@@ -179,8 +185,13 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
try {
|
||||
if (!TextUtils.isEmpty(mV2XPushMessageEntity.getHeadImgUrl())) {
|
||||
V2XServiceManager.getImageLoader()
|
||||
.displayImage(mV2XPushMessageEntity.getHeadImgUrl(), ivHead);
|
||||
if (VR_MODE) {
|
||||
Glide.with(mContext).load(mV2XPushMessageEntity.getHeadImgUrl()).apply(RequestOptions.bitmapTransform(
|
||||
new GlideRoundedCornersTransform(20, GlideRoundedCornersTransform.CornerType.LEFT))).into(ivHead);
|
||||
} else {
|
||||
V2XServiceManager.getImageLoader()
|
||||
.displayImage(mV2XPushMessageEntity.getHeadImgUrl(), ivHead);
|
||||
}
|
||||
}
|
||||
tvName.setText(mV2XPushMessageEntity.getDisplayName());
|
||||
|
||||
|
||||
@@ -214,8 +214,13 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
imgUrl = mNoveltyInfo.getItems().get(0).getUrl();
|
||||
}
|
||||
if (!TextUtils.isEmpty(imgUrl)) {
|
||||
Glide.with(mContext).load(imgUrl).apply(RequestOptions.bitmapTransform(
|
||||
new GlideRoundedCornersTransform(20, GlideRoundedCornersTransform.CornerType.LEFT))).into(ivEventImg);
|
||||
if (VR_MODE) {
|
||||
Glide.with(mContext).load(imgUrl).apply(RequestOptions.bitmapTransform(
|
||||
new GlideRoundedCornersTransform(20, GlideRoundedCornersTransform.CornerType.LEFT))).into(ivEventImg);
|
||||
} else {
|
||||
V2XServiceManager.getImageLoader()
|
||||
.displayImage(imgUrl, ivEventImg);
|
||||
}
|
||||
}
|
||||
if (url.contains(".mp4")) {
|
||||
ivEventImg.setOnClickListener(v -> {
|
||||
|
||||
Reference in New Issue
Block a user