Skip to content

Commit 54678ef

Browse files
committed
Release version 1.0.9
1 parent 219286c commit 54678ef

9 files changed

Lines changed: 26 additions & 17 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,25 @@ balloon.showAlignLeft(anchor: View) // shows the balloon on an anchor view as th
9999
balloon.showAlignLeft(anchor: View, xOff: Int, yOff: Int) // shows left alignment with x-off and y-off.
100100
```
101101

102-
Or you can show balloon popup using kotlin extension.
102+
Or we can show balloon popup using kotlin extension.
103103

104104
```java
105105
myButtom.showAlignTop(balloon)
106106
```
107+
We can dismiss popup simply using `Balloon.dismiss()` method.
108+
```java
109+
balloon.dismiss()
110+
balloon.dismissWithDelay(1000L) // dismisses 1000 milliseconds later when the popup is shown
111+
```
112+
We can dismiss automatically some milliseconds later when the popup is shown using <br>
113+
`setAutoDismissDuration` method on `Balloon.Builder`.
114+
```java
115+
Balloon.Builder(baseContext)
116+
// dismisses automatically 1000 milliseconds later when the popup is shown.
117+
.setAutoDismissDuration(1000L)
118+
...
119+
```
120+
107121

108122
### Show sequentially
109123
We can show balloon popup sequentially using `relayShow` method. <br>
@@ -259,7 +273,7 @@ val balloon = Balloon.Builder(baseContext)
259273
.setWidthRatio(0.55f)
260274
.setHeight(250)
261275
.setCornerRadius(4f)
262-
.setBackgroundColor(ContextCompat.getColor(baseContext, R.color.background900))
276+
.setBackgroundColor(ContextCompat.getColor(this, R.color.black))
263277
.setBalloonAnimation(BalloonAnimation.CIRCULAR)
264278
.setLifecycleOwner(lifecycleOwner)
265279
.build()

app/src/main/java/com/skydoves/balloondemo/factory/ProfileBalloonFactory.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class ProfileBalloonFactory : Balloon.Factory() {
3838
setBackgroundColorResource(R.color.background900)
3939
setBalloonAnimation(BalloonAnimation.CIRCULAR)
4040
setDismissWhenShowAgain(true)
41-
setPreferenceName("profile balloon")
42-
setShowTime(3)
4341
setLifecycleOwner(lifecycle)
4442
}
4543
}

app/src/main/java/com/skydoves/balloondemo/factory/TagBalloonFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TagBalloonFactory : Balloon.Factory() {
3535
setHeight(60)
3636
setCornerRadius(4f)
3737
setBalloonAnimationStyle(R.style.ElasticAndFadeOut)
38-
setBackgroundColorResource(R.color.white)
38+
setBackgroundColorResource(R.color.white_93)
3939
setAutoDismissDuration(2000L)
4040
setDismissWhenClicked(true)
4141
setDismissWhenShowAgain(true)

app/src/main/res/layout/activity_custom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
android:layout_alignParentBottom="true"
176176
android:background="@color/colorPrimary"
177177
app:itemBackground="@color/colorPrimary"
178-
app:itemIconTint="@color/white"
179-
app:itemTextColor="@color/white"
178+
app:itemIconTint="@color/white_93"
179+
app:itemTextColor="@color/white_93"
180180
app:layout_behavior="tech.thdev.app.view.BottomNavigationBehavior"
181181
app:menu="@menu/menus" />
182182
</RelativeLayout>

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
android:layout_alignParentBottom="true"
168168
android:background="@color/colorPrimary"
169169
app:itemBackground="@color/colorPrimary"
170-
app:itemIconTint="@color/white"
171-
app:itemTextColor="@color/white"
170+
app:itemIconTint="@color/white_93"
171+
app:itemTextColor="@color/white_93"
172172
app:menu="@menu/menus" />
173173
</RelativeLayout>

balloon/src/main/java/com/skydoves/balloon/Balloon.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ class Balloon(
802802
/** dismisses when the popup clicked. */
803803
fun setDismissWhenClicked(value: Boolean): Builder = apply { this.dismissWhenClicked = value }
804804

805-
/** dismisses automatically after showing with some durations. */
805+
/** dismisses automatically some milliseconds later when the popup is shown. */
806806
fun setAutoDismissDuration(value: Long): Builder = apply { this.autoDismissDuration = value }
807807

808808
/** sets the preference name for persisting showing times([showTimes]). */

balloon/src/main/java/com/skydoves/balloon/TextForm.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package com.skydoves.balloon
2020

2121
import android.content.Context
22+
import android.graphics.Color
2223
import android.graphics.Typeface
2324
import androidx.annotation.ColorInt
2425

@@ -50,7 +51,7 @@ class TextForm(builder: Builder) {
5051
var textSize: Float = 12f
5152
@JvmField
5253
@ColorInt
53-
var textColor = context.contextColor(R.color.white)
54+
var textColor = Color.WHITE
5455
@JvmField
5556
var textTypeface = Typeface.NORMAL
5657
@JvmField

balloon/src/main/res/values/colors.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

dependencies.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ext.versions = [
22
minSdk : 16,
33
compileSdk : 29,
4-
versionCode : 9,
5-
versionName : '1.0.8',
4+
versionCode : 10,
5+
versionName : '1.0.9',
66

77
gradleBuildTool : '3.5.1',
88
spotlessGradle : '3.26.1',

0 commit comments

Comments
 (0)