5

I have a MainActivity and 3 Fragments-

  1. Fragment A
  2. Fragment B
  3. Fragment C

I have to replace fragments with PageCurl Effect A->B->C

How can I do this using PageCurl Effect for Fragments?

I have read PageCurl links, But they are only for images.

chewpoclypse
  • 500
  • 5
  • 20
Vishwanath.M
  • 6,235
  • 11
  • 42
  • 56
  • Hi. I have a query here. Why and how would you load 100 fragments to an activity? Instead can you not use one fragment and replace the view inside it? I am not aware of your scenario though. This might help me to help you. :) – Andro Selva Aug 23 '16 at 07:31
  • Hi, Have you reached a solution yet for that, I'm still looking for an answer and I could use some help @Vishwanath.M – Ahmed Ashraf Oct 17 '16 at 22:35

1 Answers1

0

I guess you want to use one of these Page Curl libraries:

  1. Harri Smått android_page_curl
  2. Moritz Wundke android_page_curl

A couple of months before, I've thought a way to create the page curl effect for my ebook application. But it still as an idea not yet implemented. This idea uses library no.1.

Here the simple steps:

  1. Load fragment A
  2. Get a whole fragment A screenshot. (this could be a help: Take a screenshot of a whole View)
  3. Set screenshot from step 2 as the first image for the library.
  4. Load fragment B and C
  5. Get a whole fragment B and C screenshot.
  6. Save as the second and third image for the library.

For the second library, you can learn how to do it like PageTurner doing. But please be aware that PageTurner is licensed under GPL-V3 license.

Community
  • 1
  • 1
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
  • HI, I had tried both but not working, when we have 100 pages taking screenshot of 100 pages and saving it will not be heavy..? – Vishwanath.M Aug 22 '16 at 06:21
  • You don't need to get the screenshot of all the pages. Instead, try only to get a reasonable total page screenshot that user could view without giving a sense of lagging. Maybe about 10 or 15 pages. Whenever user scrolling the page, get the next screenshot. You could try positioning user current page at the middle. For example, if user on page 5, then you could prepare 6 pages after page 5 and 4 pages before page 5. – ישו אוהב אותך Aug 22 '16 at 07:21