mars885 / gamedge

An Android application for browsing video games and checking the latest gaming news from around the world.
Apache License 2.0
638 stars 63 forks source link

Preload images inside the image viewer screen #141

Closed mars885 closed 1 week ago

mars885 commented 2 years ago

The ViewPager2 class has the method setOffscreenPageLimit that allows to preload a specified number of items on either side.

Before the Jetpack Compose migration, it was used to preload images inside the image viewer screen.

However, the Accompanist's analogue of the ViewPager2, does not currently support that. Consider adding it as soon as support for this feature is released.

The issue to track on the Accompanist's side.

TemMax commented 2 years ago

+. This feature will be very useful when need to transform pages. For example, using translationX. Now we can't do this because composable will be removed from composition due to scroll.