android-PageFlip icon indicating copy to clipboard operation
android-PageFlip copied to clipboard

How to maintain the sequence of the page flip.

Open SachinSoma opened this issue 5 years ago • 1 comments

Hey its a wonderful library . I am trying to implement it, but the library does not the show pages in sequence I declared in array. And when i go to previous page their is some other random page. I want to maintain the sequence just like a book. Can you help on this.

SachinSoma avatar Feb 20 '20 05:02 SachinSoma

Please see this line: https://github.com/eschao/android-PageFlip/blob/adf677e156fd83c8a6eaea650e493e82c876f8c2/Sample/src/main/java/com/eschao/android/widget/sample/pageflip/SinglePageRender.java#L181
This line is used to draw new page into a bitmap and then the bitmap will be passed to PageFlip to show, and here, you will see its function has a number parameter: https://github.com/eschao/android-PageFlip/blob/adf677e156fd83c8a6eaea650e493e82c876f8c2/Sample/src/main/java/com/eschao/android/widget/sample/pageflip/SinglePageRender.java#L174 You can load the bitmap according to the number, number means which page will be showed, it could be an index of you bitmap array. With that, I think you will get the sequence pages to show.

eschao avatar Feb 29 '20 13:02 eschao