Skip to content

Commit 3f5b825

Browse files
committed
merge origin/main to compose-1.4
1 parent 42c2e16 commit 3f5b825

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Publish
22

33
on:
44
release:
5-
# We'll run this workflow when a new GitHub release is created
6-
types: [released]
5+
types: [published]
76

87
jobs:
98
publish:

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@
1313

1414
# Get Started
1515
## Gradle
16+
|Compose|Library|
17+
|--|--|
18+
|Compose 1.3.x|<img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.holix.android/bottomsheetdialog-compose?style=for-the-badge&versionPrefix=1.1"/>|
19+
|Compose 1.4.x|<img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.holix.android/bottomsheetdialog-compose?style=for-the-badge&versionPrefix=1.2"/>|
20+
|Compose 1.5.x|<img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.holix.android/bottomsheetdialog-compose?style=for-the-badge&versionPrefix=1.3"/>|
1621
```gradle
1722
// module's build.gradle
1823
dependencies {
19-
implementation "com.holix.android:bottomsheetdialog-compose:1.1.0"
24+
implementation "com.holix.android:bottomsheetdialog-compose:{version}"
2025
}
2126
```
2227
## Usage

bottomsheetdialog-compose/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ android {
5252
dependencies {
5353
implementation platform(Dependencies.composeBom)
5454
implementation Dependencies.composeUI
55+
implementation Dependencies.composeFoundation
5556
implementation Dependencies.androidxActivityKtx
5657
implementation Dependencies.androidxCoreKtx
5758
implementation Dependencies.material

bottomsheetdialog-compose/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/BottomSheetDialog.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ import android.graphics.Outline
55
import android.os.Build
66
import android.view.*
77
import androidx.activity.addCallback
8+
import androidx.activity.setViewTreeOnBackPressedDispatcherOwner
89
import androidx.annotation.FloatRange
910
import androidx.annotation.IntRange
1011
import androidx.annotation.Px
12+
import androidx.compose.foundation.gestures.Orientation
13+
import androidx.compose.foundation.gestures.rememberScrollableState
14+
import androidx.compose.foundation.gestures.scrollable
1115
import androidx.compose.runtime.*
1216
import androidx.compose.runtime.saveable.rememberSaveable
1317
import androidx.compose.ui.Modifier
@@ -278,6 +282,7 @@ fun BottomSheetDialog(
278282
BottomSheetDialogLayout(
279283
Modifier
280284
.nestedScroll(rememberNestedScrollInteropConnection())
285+
.scrollable(state = rememberScrollableState{ 0f }, orientation = Orientation.Vertical)
281286
.semantics { dialog() },
282287
) {
283288
currentContent()
@@ -423,6 +428,7 @@ private class BottomSheetDialogWrapper(
423428
setContentView(bottomSheetDialogLayout)
424429
bottomSheetDialogLayout.setViewTreeLifecycleOwner(composeView.findViewTreeLifecycleOwner())
425430
bottomSheetDialogLayout.setViewTreeViewModelStoreOwner(composeView.findViewTreeViewModelStoreOwner())
431+
bottomSheetDialogLayout.setViewTreeOnBackPressedDispatcherOwner(this)
426432
bottomSheetDialogLayout.setViewTreeSavedStateRegistryOwner(
427433
composeView.findViewTreeSavedStateRegistryOwner()
428434
)

buildSrc/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/Configuration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ object Configuration {
66
const val minSdk = 21
77
const val majorVersion = 1
88
const val minorVersion = 2
9-
const val patchVersion = 0
9+
const val patchVersion = 1
1010
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
11-
const val versionCode = 120
11+
const val versionCode = 121
1212
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
1313
const val artifactGroup = "com.holix.android"
1414
}

0 commit comments

Comments
 (0)