Glimpse: Preload 2 pages on either side of current page

Better user experience while scrolling

Change-Id: Ic707c2f37a4cef1954be604e990e3bcab7778f4c
This commit is contained in:
Luca Stefani 2023-08-09 11:58:31 +02:00 committed by Sebastiano Barezzi
parent de55efce60
commit 020ea47a06
No known key found for this signature in database
GPG Key ID: 763BD3AE91A7A13F
1 changed files with 1 additions and 0 deletions

View File

@ -294,6 +294,7 @@ class MediaViewerFragment : Fragment(
}
viewPager.adapter = mediaViewerAdapter
viewPager.offscreenPageLimit = 2
viewPager.registerOnPageChangeCallback(onPageChangeCallback)
shareButton.setOnClickListener {