Skip to content

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

License

Notifications You must be signed in to change notification settings

xujiaji/HappyBubble

Repository files navigation

HappyBubble

GitHub release GitHub release

Bubble layout change at will;

Dialog according to click View position display;

Old README

How to get started?

Add HappyBubble dependency into your build.gradle

compile 'com.github.xujiaji:happy-bubble:1.0.1'

How to use HappyBubble?

I am writing related doc.Stay tuned.

How to use BubbleLayout?

Define attributes in XML code.

Attributes reference table

Description Attrs Value
Arrow pointing lookAt left, top, right, bottom
Arrow length lookLength dimension
Arrow relative x or y axis position lookPosition dimension
Arrow width lookWidth dimension
Bubble color bubbleColor color
Bubble arc bubbleRadius dimension
Bubble border to content distance bubblePadding dimension
Shadow radius shadowRadius dimension
Shading offset in the x-axis shadowX dimension
Shading offset in the y-axis shadowY dimension
Shades of color shadowColor color

xml example

    <com.xujiaji.happybubble.BubbleLayout
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/bubbleLayout"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:layout_margin="16dp"
        app:lookAt="left"
        app:lookLength="16dp"
        app:lookPosition="20dp"
        app:lookWidth="16dp" />

Define attributes in java code.

BubbleLayout by calling the 'set + Attr' method and invalidate method.As follows.

mBubbleLayout.setLook(BubbleLayout.Look.LEFT);
mBubbleLayout.invalidate();

License

   Copyright 2016 XuJiaji

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages