Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ViewPager with ViewPager2 to achieve better performance. #880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kn0w-n0thing
Copy link

Above of all, please let me show the appreciation of this project.
But a little problem came to me when I migrated the codes to my own project. That is, ViewPager's performance is not good enough. Whenever a preview page is slided in, a new PreviewItemFragment is crated.
So I replace ViewPager with ViewPager2, which automatically caches one page on each side of the current preview page.
I hope it will be helpful to the project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant