Skip to content

Commit

Permalink
修改气泡弹窗偏移逻辑,箭头不动只便宜弹窗
Browse files Browse the repository at this point in the history
  • Loading branch information
junixapp committed Nov 23, 2022
1 parent 50ce2da commit 7a32bfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,11 @@ public void onSelect(int position, String text) {
.show();
// new XPopup.Builder(getContext())
// .isTouchThrough(true)
// .isViewMode(true)
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
// .atView(view.findViewById(R.id.vv))
// .hasShadowBg(false) // 去掉半透明背景
// .offsetX(-XPopupUtils.dp2px(getContext(), 60))
//// .offsetX(XPopupUtils.dp2px(getContext(), 20))
// .asCustom(new CustomBubbleAttachPopup(getContext()))
// .show();
Expand All @@ -391,7 +393,6 @@ public void onSelect(int position, String text) {
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
.atView(view.findViewById(R.id.vv2))
.hasShadowBg(false) // 去掉半透明背景
// .offsetX(XPopupUtils.dp2px(getContext(), 20))
.asCustom(new CustomBubbleAttachPopup(getContext()))
.show();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void run() {
bubbleContainer.setLookPosition(Math.max(0, (int) ( rect.width()/2 - defaultOffsetX + bubbleContainer.mLookWidth/2)));
}
}else {
bubbleContainer.setLookPosition(Math.max(0, (int) (rect.right - rect.width()/2 - defaultOffsetX - translationX - bubbleContainer.mLookWidth/2)));
bubbleContainer.setLookPosition(Math.max(0, (int) (rect.right - rect.width()/2 - translationX - bubbleContainer.mLookWidth/2)));
}
bubbleContainer.invalidate();

Expand Down

0 comments on commit 7a32bfd

Please sign in to comment.