如何知道什么时候下一个/ previous页由harism页面卷曲效果已经完全加载? [英] how to know when the next/previous page has completely loaded in the page curl effect by harism?

查看:140
本文介绍了如何知道什么时候下一个/ previous页由harism页面卷曲效果已经完全加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中实现页卷曲效应harism

I have implemented Page Curl Effect by harism in my application.

现在我需要做的页面顶部的一些文字动画。我能够把文字一翻,也能制作动画。但是,我需要知道什么时候该卷曲效果已经完成,下一首/ previous页面完全加载,因为我需要让TextView的无形的,停止动画当页面卷曲效果正在进行中。

Now I need to do some text animation on top of the pages. I am able to put the text over the pages and also able to animate. However, I need to know when the curl effect has completed and next/previous page has completely loaded, as I need to make the TextView invisible and stop the animation when the page curl effect is in process.

我一直在苦苦寻找,当页面完全加载/页面卷曲动画结束。我也张贴了我的问题,在这些问题部分的github harism库和 android-在谷歌论坛开发者论坛,但没有收到任何回复。希望能得到一些帮助在这里。

I have been struggling to find when the page is completely loaded/page curl animation has finished. I have also posted my question on github harism repository in the issues section and android-developers forum on Google Groups, but have not received any replies. Hope to get some help out here.

谢谢!

推荐答案

有方法的 onDrawFrame 在CurlView类。在那里,你可以看到,code的一些地方,你可以决定是否页面已经被完全加载:

There is method onDrawFrame in CurlView class. There you can see that parts of code where you can determine if page has been completely loaded:

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


如果这是正确的页面卷曲

and if it is right page curl

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

这篇关于如何知道什么时候下一个/ previous页由harism页面卷曲效果已经完全加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆