diff --git a/app/src/main/java/com/tayfuncesur/curvedbottomsheetdemo/WavedActivity.kt b/app/src/main/java/com/tayfuncesur/curvedbottomsheetdemo/WavedActivity.kt index b845eea..bc73b7e 100644 --- a/app/src/main/java/com/tayfuncesur/curvedbottomsheetdemo/WavedActivity.kt +++ b/app/src/main/java/com/tayfuncesur/curvedbottomsheetdemo/WavedActivity.kt @@ -28,6 +28,10 @@ class WavedActivity : AppCompatActivity() { view = bottom_sheet, type = CurvedBottomSheet.Type.WAVE, callback = object : Callback { + override fun onStateChanged(p0: View, state: Int) { + + } + override fun onSlide(p0: View, p1: Float) { contentLayout.alpha = p1 dolphinLayout.alpha = 1 - p1 diff --git a/lib/build.gradle b/lib/build.gradle index b2151c5..bbf58ae 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 28 - versionCode 4 - versionName "1.1" + versionCode 5 + versionName "1.2" } } diff --git a/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/Callback.kt b/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/Callback.kt index e36d852..a05e1c4 100644 --- a/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/Callback.kt +++ b/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/Callback.kt @@ -4,4 +4,5 @@ import android.view.View interface Callback { fun onSlide(p0: View, p1: Float) + fun onStateChanged(p0: View, state: Int) } \ No newline at end of file diff --git a/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/CurvedBottomSheet.kt b/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/CurvedBottomSheet.kt index c7094c6..9f78f65 100644 --- a/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/CurvedBottomSheet.kt +++ b/lib/src/main/java/com/tayfuncesur/curvedbottomsheet/CurvedBottomSheet.kt @@ -46,14 +46,14 @@ class CurvedBottomSheet( } override fun onStateChanged(p0: View, p1: Int) { - + callback?.onStateChanged(p0, p1) } }) } else { topSheetBehavior = TopSheetBehavior.from(view) topSheetBehavior.setTopSheetCallback(object : TopSheetBehavior.TopSheetCallback() { override fun onStateChanged(bottomSheet: View, newState: Int) { - + callback?.onStateChanged(bottomSheet, newState) } override fun onSlide(bottomSheet: View, slideOffset: Float, isOpening: Boolean?) {