Skip to content

Commit

Permalink
Release version 1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Jun 16, 2020
1 parent 0bbbb2e commit baa091f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ allprojects {
And add a dependency code to your **module**'s `build.gradle` file.
```gradle
dependencies {
implementation "com.github.skydoves:balloon:1.1.7"
implementation "com.github.skydoves:balloon:1.1.8"
}
```

Expand All @@ -46,11 +46,12 @@ Here is a basic example of implementing balloon popup with icon and text using `
Balloon balloon = new Balloon.Builder(context)
.setArrowSize(10)
.setArrowOrientation(ArrowOrientation.TOP)
.setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
.setArrowPosition(0.5f)
.setArrowVisible(true)
.setWidthRatio(1.0f)
.setHeight(65)
.setTextSize(15f)
.setArrowPosition(0.62f)
.setCornerRadius(4f)
.setAlpha(0.9f)
.setText("You can access your profile from now on.")
Expand Down Expand Up @@ -169,6 +170,18 @@ We can customize the arrow on the balloon popup. <br>
.setArrowDrawable(ContextCompat.getDrawable(context, R.drawable.arrow)) // sets the arrow drawable.
```

#### ArrowConstraints
We can determines the constraints of the arrow positioning using the `ArrowConstraints`.<br>
This constraint affects the `setArrowPosition`.
```kotlin
// Aligning arrow based on the anchor view.
// if an arrowPosition is 0.5, the arrow will be positioned center of the anchor view.
.setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
// Aligning arrow based on the balloon popup.
// if an arrowPosition is 0.5, the arrow will be positioned center of the balloon popup.
.setArrowConstraints(ArrowConstraints.ALIGN_BALLOON) // default
```

Below previews are implemented using `setArrowOrientation` and `setArrowPosition` methods. <br>
`setArrowPosition` measures the balloon popup size and sets the arrow's position using the ratio value.

Expand Down Expand Up @@ -423,6 +436,7 @@ FADE | OVERSHOOT | ELASTIC | CIRCULAR |
.setArrowSize(value: Int)
.setArrowPosition(@FloatRange(from = 0.0, to = 1.0) value: Float)
.setArrowOrientation(value: ArrowOrientation)
.setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
.setArrowColor(value: Int)
.setArrowColorResource(value: Int)
.setArrowDrawable(value: Drawable?)
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext.versions = [
minSdk : 16,
compileSdk : 29,
versionCode : 18,
versionName : '1.1.7',
versionCode : 19,
versionName : '1.1.8',

gradleBuildTool : '3.6.3',
spotlessGradle : '4.0.1',
Expand Down

0 comments on commit baa091f

Please sign in to comment.