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.)
Apache License 2.0
716 stars 113 forks source link

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

Open TopTime1 opened 1 year ago

TopTime1 commented 1 year ago

箭头位置在列表中设置无效; 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);

xujiaji commented 1 year ago
image

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

TopTime1 commented 1 year ago

image

设置了

xujiaji commented 1 year ago

显示出来是什么样的呢

TopTime1 commented 1 year ago

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

xujiaji commented 1 year ago

更新版本到:1.2.6

TopTime1 commented 1 year ago

1.2.6更乱了

xujiaji commented 1 year ago

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

image image
TopTime1 commented 1 year ago

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

xujiaji commented 1 year ago

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

xujiaji commented 1 year ago

可以单独使用BubbleLayout

TopTime1 commented 1 year ago

好我去试试