[Android] makeImageFromView takes a snapshot of the flatlist, the result has padding on it
Description
Hey, When I try to take a snapshot of a View that has a Flatlist using makeImageFromView, if I scroll down the Flatlist, then take a snapshot, the result of the snapshot will have padding on it, this happens only on Android works fine on iOS. Please see the GIF below Thank You
Version
0.1.229
Steps to reproduce
- Clone the Repo
- Run The App
- Scroll then press the SNAPSHOT button
- See the snapshot result
Snack, code example, screenshot, or link to a repository
https://github.com/Rakha112/BugMakeImageFromView
Experiencing this as well
This might be down to how a FlatList renders on React Native. It's derived from VirtualizedList, which as they say in the docs:
Virtualization massively improves memory consumption and performance of large lists by maintaining a finite render window of active items and replacing all items outside of the render window with appropriately sized blank space
Hey @louix thank you for your explanation. So, is this the expected behavior ? And is there a workaround for it?
The underlying problem is not attributed to padding but to snapshots being captured from the top part of the FlatList, which may have already unmounted some components due to scroll offset. Should be solved by #2306
Hey @Nodonisko, thank you for your explanation. I hope that PR will be included in the next release. Thank you very much.
Hey @Nodonisko, after updating Skia to version 1.0.5, this issue has been fixed. Thank you very much.