Merge branch 'qa_merge_shunyi_vr_map' into dev_1.1.9

This commit is contained in:
wangcongtao
2020-12-30 14:43:37 +08:00
29 changed files with 945 additions and 161 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.module.v2x.adapter.holder;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
@@ -10,11 +11,13 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.animation.BezierAnimationView;
import com.mogo.module.common.entity.MarkerExploreWay;
@@ -23,6 +26,7 @@ import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.wm.WindowManagerView;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
@@ -81,7 +85,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
private HeartLikeView ivEventZan;
private ViewGroup mViewGroup;
private WindowManagerView mWindowManagerView;
// 上传事件的用户信息
private MarkerUserInfo mUserInfo;
@@ -312,7 +316,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
e.printStackTrace();
}
}
/*
* 展示事件的图片/视频资源
* */
@@ -364,6 +368,53 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
}
}
private void bezierAnimation(int[] loc) {
if (mWindowManagerView == null) {
Log.d(TAG, "bezierAnimation:null");
mWindowManagerView = new WindowManagerView.Builder(mContext.getApplicationContext())
.contentView(R.layout.module_common_bezier_layout)
.size(WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT)
.position(loc[0], loc[1])
.gravity(Gravity.TOP | Gravity.LEFT)
.showInWindowManager();
}
try {
if (mWindowManagerView.isShowing()) {
return;
}
mWindowManagerView.show();
} catch (Exception e) {
e.printStackTrace();
}
BezierAnimationView bezierAnimationView = mWindowManagerView.findViewById(R.id.bezier_view);
bezierAnimationView.bezierAnimationStart();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// mWindowManagerView.dismiss();
}
}, 2000);
}
public int[] getLocation(View v) {
int[] loc = new int[4];
int[] location = new int[2];
v.getLocationOnScreen(location);
loc[0] = location[0];
loc[1] = location[1];
int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
v.measure(w, h);
loc[2] = v.getMeasuredWidth();
loc[3] = v.getMeasuredHeight();
//base = computeWH();
return loc;
}
/**
* 为了给车聊聊更多的信息需要重新查询一次
*