Also, IIRC, the plan is to hook into the system's overscroll APIs and use those. So you'd get the gray indicator thingy on Android 11 and below, and the “rubber band” effect on 12 and onwards.
a
Adam Powell
08/12/2021, 6:46 PM
Yep. If you don't want to wait for us, have a look at the Android
EdgeEffect
API and combine it with drawing modifiers' native Canvas interop plus Compose's nested scrolling capabilities. Should be able to express the effect as a modifier.
👍 2
Adam Powell
08/12/2021, 6:46 PM
EdgeEffect
is the entry point for both the glow on older platforms and Android 12's new effect
Adam Powell
08/12/2021, 6:47 PM
EdgeEffectCompat
in Jetpack exposes conditional access to some of the newer methods from Android 12 that provide additional fine-grained control over the stretch (though it'll still stretch if you use the older API surfaces too)