How to find out when the next / previous page is fully loaded into the page curl effect with charisma?

I applied the harism page curl effect in my application.

Now I need to do a text animation on top of the pages. I can place text over pages, and also die. However, I need to know when the waving effect is completed, and the next / previous page is fully loaded, since I need to make the TextView invisible and stop the animation when the page freezing process is in progress.

I struggled to find when the page is fully loaded / page curl completed. I also posted my question in the github harism repository in the question section and the Android developers forum in Google groups , but did not receive any answers. Hope to get help here.

Thanks!

+4
source share
1 answer

There is an onDrawFrame method in the CurlView class . There you can see those parts of the code where you can determine if the page has been fully loaded:

if (mCurlState == CURL_LEFT) { --mCurrentIndex; // left curl has been completely loaded //here you can add some code } 

and if this is the correct page curl

  if (mCurlState == CURL_RIGHT) { ++mCurrentIndex; // right curl has been completely loaded //here you can add some code } 
+2
source

Source: https://habr.com/ru/post/1493347/


All Articles