Status Update
Comments
ma...@google.com <ma...@google.com>
nj...@google.com <nj...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
he...@gmail.com <he...@gmail.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
nj...@google.com <nj...@google.com> #4
Thanks for filing this ticket. After some additional thought we have decided to change the default ContentScale parameter to be ContentScale.Fit instead of inside. This would make the original code example work as expected without having to be explicit. Usually when a default size is provided, the intention is the scale the content accordingly either up or down. This does not change the default behavior if no explicit size is provided.
ap...@google.com <ap...@google.com> #5
Branch: androidx-master-dev
commit 1c3daea07de792f10e46dfd4ec0d171e1cb9b7e4
Author: Nader Jawad <njawad@google.com>
Date: Mon Jun 29 13:32:51 2020
Change Default ContentScale for Image
Relnote: "Changed the default ContentScale
parameter for the Image composable
from Inside to Fit. This was done in order
to get behavior to scale up the underlying
Painter if the layout size is larger than
the intrinsic size of the painter while
maintaining the aspect ratio. This
behavior better matches expectations
for providing fixed sizes to the Image
while not affecting the default behavior
if only the intrinsic size is used to
compute the size of the composable."
Fixes: 159838006
Test: Updated ImageTest to optionally provide
ContentScale.Inside as well as removing
explicit usages of ContentScale.Fit
Change-Id: I40ae3af9b6a2efc3d730ea0ba5f457a788eca1f7
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/ImageTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Image.kt
Description
Android Studio Build: 4.2 Canary 2 Version of Gradle Plugin: 4.2.0-alpha02' Version of Gradle: 6.5-rc-1 Version of Java: 8 OS: Linux
Steps to Reproduce:
vectorResource()
to obtain a Drawable from resourcesImage()
composableModifier.size()
Example:
Image( asset = vectorResource(id = R.drawable.ic_android), modifier = Modifier.size(56.dp) )
But it does not change the size of my icon.