mertakdut / EpubParser

Parses .epub files, provides seperation page by page.
Apache License 2.0
118 stars 27 forks source link

Skip to specified page #10

Closed befora closed 7 years ago

befora commented 8 years ago

Is there an easy way to skip to a specific page?

I have tried: int customPageNumber = 25; mViewPager.setAdapter(mSectionsPagerAdapter); mViewPager.setCurrentItem(customPageNumber);

but I get a strange bug where the next few pages are repeats. My goal is to create a bookmark effect by manually inserting the desired page number.

Tested on the sample application.

Also: mViewPager.setOffscreenPageLimit(0); outputs this message: W/ViewPager: Requested offscreen page limit 0 too small; defaulting to 1

mertakdut commented 8 years ago

This is currently not possible. Library is meant to proceed sequentially.

But I am willing to add that functionality in the future. With the saving progress functionality.

befora commented 8 years ago

Looking forward to it and thanks for the quick response.

mertakdut commented 8 years ago

Let the issue stay opened. This and progress-saving functionalities are must :)

mertakdut commented 7 years ago

Skipping to specified page is now available. Please let me know if there is any issue.

You can also check the functionality on sample application (on actionbar search icon) (any gui improvement suggestions are welcome :)).