Status Update
Comments
ma...@google.com <ma...@google.com>
lp...@google.com <lp...@google.com> #2
The problem here seems to be that you are manually overriding LocalView
, which is what ripple uses to add the ripple views to the hierarchy:
Maybe we should have a fallback to use the 'software' rendering in case the view isn't attached properly, but this will result in jank because the ripples will be animated on the ui thread - so you still probably want to provide a valid view in LocalView
.
za...@gmail.com <za...@gmail.com> #3
Ah, well this is admittedly a pretty weird thing for me to be doing, so it's probably not even worth worrying about too much. I can probably rewrite that code anyway, it's pretty gross. Thanks!
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit bebb27ff8269be3f487047a1ad9acf63be4ae052
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon May 24 18:07:43 2021
Removes LocalRippleNativeRendering
Also adds an explicit error message if the view used to attach a RippleContainer to is not attached properly.
Fixes:
Test: updateApi
Relnote: "Removed LocalRippleNativeRendering now that the View-backed ripple implementation is stable"
Change-Id: I7fab3b12f34b82741c562ae8af3b2d08fbbb47c7
M compose/material/material-ripple/api/1.0.0-beta08.txt
A compose/material/material-ripple/api/current.ignore
M compose/material/material-ripple/api/current.txt
M compose/material/material-ripple/api/public_plus_experimental_1.0.0-beta08.txt
M compose/material/material-ripple/api/public_plus_experimental_current.txt
M compose/material/material-ripple/api/restricted_1.0.0-beta08.txt
A compose/material/material-ripple/api/restricted_current.ignore
M compose/material/material-ripple/api/restricted_current.txt
D compose/material/material-ripple/src/androidAndroidTest/kotlin/androidx/compose/material/ripple/LocalRippleNativeRenderingTest.kt
M compose/material/material-ripple/src/androidMain/kotlin/androidx/compose/material/ripple/Ripple.android.kt
Description
Jetpack Compose release version: 1.0.0-beta07 Android Studio Build: 7.1.0-alpha01
It seems that in some cases the new
RippleDrawable
-backed ripple implementation in beta07 crashes.I haven't figured out what the exact conditions required are to get the ripple to crash, but you should be able to reproduce the crash by checking out the compose-richtext repository from GitHub and running the sample app (there's only one app in the project).
zachklipp/repro-ripple-bug
branch of theThe stack trace starts as follows (full trace attached):