eschao / android-PageFlip

3D Style Page Flip on Android
Apache License 2.0
1.74k stars 262 forks source link

How can I modify the current page? #38

Closed edgelv34 closed 6 years ago

edgelv34 commented 6 years ago

We found that the drawPage method, located inside the SinglePageRender on the sample app, displays the current page in text.

If the current page is three, the text will show three.

I would like to change the number on the current page without flip it.

What should I do?

eschao commented 6 years ago

You mean directly show page 3 without any animation? You could do:

  1. Get first page: mPageFlip.getFirstPage() , in single page mode, only the first page is valid.
  2. Delete all textures in this page: page.deleteAllTextures()
  3. Set current Page No is 3 in PageRender and request a draw full frame command
edgelv34 commented 6 years ago

Oh, it's solved. Thank you.