Merge branch 'dev_merge_shunyi_vr_map' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev_merge_shunyi_vr_map
This commit is contained in:
@@ -72,8 +72,8 @@ public class ObjectUtils {
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(new LonLatPoint(opt.getLongitude(), opt.getLatitude()))
|
||||
.anchor(opt.getU(), opt.getV())
|
||||
// .icons( descriptors )
|
||||
// .period( opt.getPeriod() )
|
||||
.icons( descriptors )
|
||||
.period( opt.getPeriod() )
|
||||
.rotateAngle(opt.getRotate())
|
||||
.setFlat(opt.isFlat())
|
||||
.visible(opt.isVisible())
|
||||
|
||||
@@ -2,9 +2,12 @@ package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@@ -13,6 +16,7 @@ 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.animation.BezierAnimationView;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
@@ -76,6 +80,8 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private ImageView ivEventReportErr;
|
||||
private HeartLikeView ivEventZan;
|
||||
|
||||
private ViewGroup mViewGroup;
|
||||
|
||||
|
||||
// 上传事件的用户信息
|
||||
private MarkerUserInfo mUserInfo;
|
||||
@@ -148,6 +154,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail, viewGroup, false)
|
||||
, v2XWindow);
|
||||
mContext = viewGroup.getContext();
|
||||
mViewGroup = viewGroup;
|
||||
init(itemView);
|
||||
// 设置视图状态监听
|
||||
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
||||
@@ -261,7 +268,8 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP,
|
||||
v2XVoiceOpenLiveListener);
|
||||
ivEventLive.setOnClickListener(v -> {
|
||||
showLiveCar(v2XEventShowEntity);
|
||||
getCoordinateForFather(ivEventLive);
|
||||
// showLiveCar(v2XEventShowEntity);
|
||||
});
|
||||
} else {
|
||||
ivEventLive.setVisibility(GONE);
|
||||
@@ -306,6 +314,30 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
private void getCoordinateForFather(View view) {
|
||||
try {
|
||||
float f_top = view.getTop();//view自身的顶边到其父布局顶边的距离
|
||||
float f_left = view.getY();//view自身的左边到其父布局左边的距离
|
||||
float f_right = view.getRight();//view自身的右边到其父布局左边的距离
|
||||
float f_bottom = view.getBottom();//view自身的底边到其父布局顶边的距离
|
||||
float x_left = view.getX();//点击事件距离控件左边的距离
|
||||
float y_top = view.getTop();//点击事件距离控件顶边的距离
|
||||
|
||||
Log.d("getCoordinateForFather", "f_top:" + f_top + "f_left:" + f_left + "f_right:"
|
||||
+ f_right + "f_bottom:" + f_bottom + "x_left:" + x_left + "y_top:" + y_top);
|
||||
|
||||
//动态添加贝塞尔动画view
|
||||
BezierAnimationView bezierAnimationView = new BezierAnimationView(mContext);
|
||||
Drawable drawable = mContext.getResources().getDrawable(R.drawable.bg_v2x_event_type_orange_vr);
|
||||
bezierAnimationView.setBackground(drawable);
|
||||
mViewGroup.addView(bezierAnimationView, 20, 20);
|
||||
bezierAnimationView.setGravity(Gravity.CENTER);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 展示事件的图片/视频资源
|
||||
* */
|
||||
|
||||
@@ -60,6 +60,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
private static CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
||||
// 上次的道路事件的预警Marker
|
||||
private static IMogoMarker mAlarmInfoMarker;
|
||||
|
||||
@Override
|
||||
public void drawableLastAllPOI() {
|
||||
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||
@@ -257,19 +258,20 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
.longitude(roadEventEntity.getLocation().getLon());
|
||||
optionsRipple.anchor(0.5f, 0.5f);
|
||||
|
||||
// 由于性能问题,D车机不使用事件扩散动画
|
||||
//由于性能问题,D车机不使用事件扩散动画
|
||||
//showInfoWindow只支持添加单个marker,不支持帧动画
|
||||
if (!CarSeries.isF8xxSeries()) {
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else {
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
} else {
|
||||
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
|
||||
optionsRipple.period(1);
|
||||
}
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else{
|
||||
// optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
optionsRipple.period(100);
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
// 当前Marker设置为最上面
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivEventLive"
|
||||
app:layout_constraintStart_toEndOf="@id/ivEventEventNav"
|
||||
app:layout_goneMarginLeft="@dimen/dp_10"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -198,8 +198,8 @@
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:maxLines="1"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@id/ivFaultHelpHead"
|
||||
@@ -73,7 +73,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.59"
|
||||
android:textColor="@color/v2x_FFF_999"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintStart_toStartOf="@id/tvFaultHelpName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFaultHelpName"
|
||||
@@ -87,7 +87,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_70"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivFaultHelpEventCall"
|
||||
|
||||
Reference in New Issue
Block a user