Update androidx.compose.material3 to v1.1.0-alpha08 (#3360)
* Update dependency androidx.compose.material3:material3 to v1.1.0-alpha08 * Migrate confirmStateChange * Remove bottomSheetState.isAnimationRunning --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
+1
-1
@@ -329,7 +329,7 @@ dependencies {
|
||||
implementation "androidx.compose.material:material-icons-extended"
|
||||
implementation "androidx.compose.material:material"
|
||||
implementation "androidx.compose.runtime:runtime-livedata"
|
||||
implementation 'androidx.compose.material3:material3:1.1.0-alpha06'
|
||||
implementation 'androidx.compose.material3:material3:1.1.0-alpha08'
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.activity:activity-compose:1.6.1"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0"
|
||||
|
||||
@@ -34,8 +34,8 @@ import androidx.compose.ui.layout.layout
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.unit.Constraints
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.max
|
||||
import kotlinx.coroutines.launch
|
||||
import androidx.compose.material.MaterialTheme as Material2Theme
|
||||
|
||||
internal val LocalBottomSheetHandler = staticCompositionLocalOf { BottomSheetHandler() }
|
||||
@@ -55,7 +55,7 @@ fun ProvideBottomSheetHandler(
|
||||
val bottomSheetState = remember {
|
||||
ModalBottomSheetState(
|
||||
initialValue = ModalBottomSheetValue.Hidden,
|
||||
confirmStateChange = {
|
||||
confirmValueChange = {
|
||||
if (it == ModalBottomSheetValue.Hidden) onDismiss()
|
||||
true
|
||||
},
|
||||
@@ -82,8 +82,7 @@ fun ProvideBottomSheetHandler(
|
||||
|
||||
ModalBottomSheetLayout(
|
||||
sheetContent = {
|
||||
val isSheetShown = bottomSheetState.isAnimationRunning || bottomSheetState.isVisible
|
||||
BackHandler(enabled = isSheetShown) {
|
||||
BackHandler(enabled = bottomSheetState.isVisible) {
|
||||
bottomSheetHandler.hide()
|
||||
}
|
||||
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onSurface) {
|
||||
|
||||
Reference in New Issue
Block a user