Search code examples
androidandroid-jetpack-composescreenshot

Has anyone implemented ScrollCaptureCallback successfully in a Compose app?


I'm trying to utilize the scrolling screenshot feature of android 12 in my app, but it looks like something is needed in the screen order for it to work, the only thing I have found on the topic is ScrollCaptureCallback but there isn't documentation on how to implement it. Has anyone tried this?

I've tried to look into how to apply a View function in a composable, but other than developing the screen as a view instead of composables I haven't found any other way to make it work.


Solution

  • I am not sure if it would be feasible to implement this on the level of app code instead of the Compose framework itself, where it is currently missing. According to https://issuetracker.google.com/issues/197906322, it seems to exist on the Compose team's backlog.