Android 12 has a new overscroll effect which works...
# compose
j
Android 12 has a new overscroll effect which works out of the box with existing apps. Compose views seem to be an exception though, they don’t get the new effect automatically. Will this require reimplementing the effect in the compose library in an upcoming version? https://developer.android.com/about/versions/12/overscroll
👀 2
😂 1
a
nah compose will just call into the platform api for this. You'll note compose doesn't currently show the glow either 🙂
j
😌
For a second I had nightmares of 3rd party UI toolkits chasing the everchanging platform UI 🤣
j
Custom effects API is not going to be available?
a
in practice you can already build any custom effect for overscroll you like today by participating in nested scrolling
👀 2
s
The people who implement the effect on platform ui toolkit are the same as the people who are core contributors to compose (fwiw)
👍 5
☝️ 1
☝🏼 1
👍🏼 1
j
You’ll note compose doesn’t currently show the glow either (@Adam Powell)
This kinda broke my compose mental model: I thought that compose was drawing inside its own Skia managed surface, and thus would not be possible for effects managed by the platform (such as with the overscroll) to be able to affect compose views (similar to Flutter). What did I get wrong?
a
Compose uses the platform's canvas and hwui/skia implementation on android, not a separate surface. This is a lot more lightweight than a separate surface and permits this kind of mix and match.
🙏 2
😮 2
c
it is clearly a post-1.0 feature
Wow, when this feature appears, I believe it will take Compose to a higher level K