Fixed
Status Update
Comments
se...@google.com <se...@google.com>
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3d00acd443e0e5dd2cc33eb314a65f78f21cec61
Author: Calin Tataru <calintat@google.com>
Date: Mon Aug 10 17:59:53 2020
Modifier.swipeable polishing
This CL does the following things:
* Expand the documentation in SwipeableState.
* Make the setter of SwipeableState.value private.
* Rename some of the properties in SwipeableState, and slightly change
the definition of swipeTarget (now called targetValue) so that it uses
the target value of the ongoing animation if isAnimationRunning = true.
* Add a rememberSwipeableState function to help reduce boilerplate.
* Add Savers for [Drawer/BottomDrawer/Dismiss/Swipeable]State, so that
we can use rememberSavedInstanceState in the rememberFooState functions.
Bug: 163129614
Bug: 163132293
Test: Ran SwipeableTest and other tests depending on swipeable
Relnote: "Renamed some properties in SwipeableState: swipeTarget ->
targetValue, swipeProgress -> progress, swipeDirection -> direction.
Added a rememberSwipeableState function for creating SwipeableStates."
Change-Id: I2fc9c3af465b579a18359ae0aa0853c2d2b02abe
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeToDismissSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
https://android-review.googlesource.com/1396349
Branch: androidx-master-dev
commit 3d00acd443e0e5dd2cc33eb314a65f78f21cec61
Author: Calin Tataru <calintat@google.com>
Date: Mon Aug 10 17:59:53 2020
Modifier.swipeable polishing
This CL does the following things:
* Expand the documentation in SwipeableState.
* Make the setter of SwipeableState.value private.
* Rename some of the properties in SwipeableState, and slightly change
the definition of swipeTarget (now called targetValue) so that it uses
the target value of the ongoing animation if isAnimationRunning = true.
* Add a rememberSwipeableState function to help reduce boilerplate.
* Add Savers for [Drawer/BottomDrawer/Dismiss/Swipeable]State, so that
we can use rememberSavedInstanceState in the rememberFooState functions.
Bug: 163129614
Bug: 163132293
Test: Ran SwipeableTest and other tests depending on swipeable
Relnote: "Renamed some properties in SwipeableState: swipeTarget ->
targetValue, swipeProgress -> progress, swipeDirection -> direction.
Added a rememberSwipeableState function for creating SwipeableStates."
Change-Id: I2fc9c3af465b579a18359ae0aa0853c2d2b02abe
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeToDismissSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
se...@google.com <se...@google.com>
pr...@google.com <pr...@google.com> #3
I added a rememberSwipeableState
function to easily create and remember a SwipeableState
with the default animation clock. That should work perfectly for your usecase.
Description
COMPOSE_MATERIAL_3 = "1.1.1"
GOOGLE_MATERIAL_COMPONENTS = "com.google.android.material:material:1.9.0"
Jetpack Compose component used: OutlinedCard
Android Studio Build: Build #AI-231.9392.1.2311.11047128
Kotlin version: 1.8.22
Steps to Reproduce or Code Sample to Reproduce:
OutlinedCard(
modifier = modifier
.weight(1f)
.wrapContentSize()
.clickable(
enabled = onElementClick != null,
onClick = { onElementClick!!.invoke() },
),
// border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant)
)
Stack trace (if applicable):