Bubble layout change at will;
Dialog according to click View position display;
Add HappyBubble dependency into your build.gradle
compile 'com.github.xujiaji:happy-bubble:1.0.1'
I am writing related doc.Stay tuned.
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" />
BubbleLayout by calling the 'set + Attr' method and invalidate method.As follows.
mBubbleLayout.setLook(BubbleLayout.Look.LEFT);
mBubbleLayout.invalidate();
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.