eschao / android-PageFlip

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

how to move particular page? #37

Closed edgelv34 closed 6 years ago

edgelv34 commented 6 years ago

Hello. First of all, thank you for making this open-source.

I would like to have a way to navigate to a particular page. When analyzing source, page movement seems to be possible only through touch. how to move particular page?

edgelv34 commented 6 years ago

For example, current max page = 1, and i add page (max page = max page + 1) so max page is 2 but focus page is 1. i want to change the focus page But they are managed by the GLSurfaceView.Renderer.onDrawFrame(GL10 gl) how to control page?

eschao commented 6 years ago

@edgelv34 I'm not sure I fully understand your question. I think you can trigger a page flipping by finger touching or finger movement with a special direction and speed. You can run the sample application to see how to flip page. For example:

  1. current page: 1
  2. finger touch on the right half of screen or move from right to left,
  3. page flipping is starting and page will be changed from 1 to 2, but remember: you need to prepare the bitmap for page 2 and pass it to PageFlip before you trigger it by finger event.

BTW: Have you used iBooks app in iOS? you can do the almost same operation on PageFlip like that to get the equally same effect and result.

edgelv34 commented 6 years ago

Can I go straight from page 1 to page 15 then? (i dont use IOS , But i try your sample app. that is good flip. but i want page control.)

edgelv34 commented 6 years ago

Oh, I solved this. I just used handlers and some methods to get through pages quickly.

What is the minimum delay for animation to work?

eschao commented 6 years ago

@edgelv34 see https://github.com/eschao/android-PageFlip#12-duration-of-flip-animating

edgelv34 commented 6 years ago

I don't want a correctable delay. just want to Minimum Delay!. example .. like 60ms