xujiaji / HappyBubble

:thought_balloon:BubbleLayout随意变化的气泡布局、消息对话框,可定制颜色,背景、弧度、尖角弧度、边框等等。BubbleDialog气泡弹窗根据点击View的位置定位它的弹窗位置,BubbleDialog可定制方向等!(BubbleLayout changes freely,BubbleDialog click on the location of View positioning its location,BubbleDialog can be customized directions.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

箭头位置在列表中设置无效

TopTime1 opened this issue · comments

箭头位置在列表中设置无效;
BubbleLayout bl = new BubbleLayout(this);
bl.setLookPosition(Util.dpToPx(this, 10));
bl.setBubbleColor(Color.YELLOW);
bl.setShadowColor(Color.RED);
bl.setLookLength(Util.dpToPx(this, 18));
bl.setLookWidth(Util.dpToPx(this, 24));
bubbleDialog = new BubbleDialog(SetClickedViewTestActivity.this)
.addContentView(dialogMain)
.setTransParentBackground()
.setPosition(BubbleDialog.Position.TOP)
.setRelativeOffset(-16)
.setBubbleLayout(bl)
.setThroughEvent(true, false);
// .autoPosition(Auto.AROUND);

image 没有配置被点击的列表中的对应view

image

设置了

显示出来是什么样的呢

就是设置不设置没效果,如果view在中间,箭头就是居中的,如果在左边,箭头的位置在view的1/2处

更新版本到:1.2.6

1.2.6更乱了

现在看位置都挺正常的,你是怎么个更乱法?
image
image

就是我把tv宽高写80dp,我设置 bl.setLookPosition(Util.dpToPx(this, 10));没效果,箭头还是居中

BubbleLayout提供的布局,用了BubbleDialog会自动调整到对齐到被点击的view中间。

可以单独使用BubbleLayout

好我去试试