Skip to content

Commit

Permalink
Released version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Aug 15, 2019
1 parent a429d2c commit a0d7560
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import com.skydoves.balloondemo.R

class CustomListBalloonFactory : Balloon.Factory() {

override fun create(context: Context, lifecycleOwner: LifecycleOwner): Balloon {
override fun create(context: Context, lifecycle: LifecycleOwner): Balloon {
return Balloon.Builder(context)
.setLayout(R.layout.layout_custom_list)
.setArrowSize(10)
Expand All @@ -37,7 +37,7 @@ class CustomListBalloonFactory : Balloon.Factory() {
.setCornerRadius(4f)
.setBackgroundColor(ContextCompat.getColor(context, R.color.background800))
.setBalloonAnimation(BalloonAnimation.FADE)
.setLifecycleOwner(lifecycleOwner)
.setLifecycleOwner(lifecycle)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ import androidx.lifecycle.LifecycleOwner
import com.skydoves.balloon.ArrowOrientation
import com.skydoves.balloon.Balloon
import com.skydoves.balloon.BalloonAnimation
import com.skydoves.balloon.createBalloon
import com.skydoves.balloondemo.R

class ProfileBalloonFactory : Balloon.Factory() {

override fun create(context: Context, lifecycleOwner: LifecycleOwner): Balloon {
return Balloon.Builder(context)
.setLayout(R.layout.layout_custom_profile)
.setArrowSize(10)
.setArrowOrientation(ArrowOrientation.TOP)
.setArrowPosition(0.5f)
.setWidthRatio(0.55f)
.setHeight(250)
.setCornerRadius(4f)
.setBackgroundColor(ContextCompat.getColor(context, R.color.background900))
.setBalloonAnimation(BalloonAnimation.CIRCULAR)
.setLifecycleOwner(lifecycleOwner)
.build()
override fun create(context: Context, lifecycle: LifecycleOwner): Balloon {
return createBalloon(context) {
setLayout(R.layout.layout_custom_profile)
setArrowSize(10)
setArrowOrientation(ArrowOrientation.TOP)
setArrowPosition(0.5f)
setWidthRatio(0.55f)
setHeight(250)
setCornerRadius(4f)
setBackgroundColor(ContextCompat.getColor(context, R.color.background900))
setBalloonAnimation(BalloonAnimation.CIRCULAR)
setLifecycleOwner(lifecycle)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ import androidx.lifecycle.LifecycleOwner
import com.skydoves.balloon.ArrowOrientation
import com.skydoves.balloon.Balloon
import com.skydoves.balloon.BalloonAnimation
import com.skydoves.balloon.createBalloon
import com.skydoves.balloondemo.R

class TagBalloonFactory : Balloon.Factory() {

override fun create(context: Context, lifecycleOwner: LifecycleOwner): Balloon {
return Balloon.Builder(context)
.setLayout(R.layout.layout_custom_tag)
.setArrowSize(10)
.setArrowOrientation(ArrowOrientation.BOTTOM)
.setArrowPosition(0.5f)
.setWidth(90)
.setHeight(60)
.setCornerRadius(4f)
.setBackgroundColor(ContextCompat.getColor(context, R.color.white))
.setBalloonAnimation(BalloonAnimation.ELASTIC)
.setLifecycleOwner(lifecycleOwner)
.build()
override fun create(context: Context, lifecycle: LifecycleOwner): Balloon {
return createBalloon(context) {
setLayout(R.layout.layout_custom_tag)
setArrowSize(10)
setArrowOrientation(ArrowOrientation.BOTTOM)
setArrowPosition(0.5f)
setWidth(90)
setHeight(60)
setCornerRadius(4f)
setBackgroundColor(ContextCompat.getColor(context, R.color.white))
setBalloonAnimation(BalloonAnimation.ELASTIC)
setLifecycleOwner(lifecycle)
}
}
}
2 changes: 1 addition & 1 deletion balloon/src/main/java/com/skydoves/balloon/Balloon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,6 @@ class Balloon(
abstract class Factory {

/** returns an instance of [Balloon]. */
abstract fun create(context: Context, lifecycleOwner: LifecycleOwner): Balloon
abstract fun create(context: Context, lifecycle: LifecycleOwner): Balloon
}
}
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 : 3,
versionName : '1.0.2',
versionCode : 4,
versionName : '1.0.3',

gradleBuildTool : '3.4.2',
spotlessGradle : '3.23.1',
Expand Down

0 comments on commit a0d7560

Please sign in to comment.