Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map
This commit is contained in:
@@ -268,8 +268,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP,
|
||||
v2XVoiceOpenLiveListener);
|
||||
ivEventLive.setOnClickListener(v -> {
|
||||
getCoordinateForFather(ivEventLive);
|
||||
// showLiveCar(v2XEventShowEntity);
|
||||
showLiveCar(v2XEventShowEntity);
|
||||
});
|
||||
} else {
|
||||
ivEventLive.setVisibility(GONE);
|
||||
@@ -313,31 +312,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 展示事件的图片/视频资源
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user