【问题标题】:how to know when the next/previous page has completely loaded in the page curl effect by harism?如何知道下一个/上一个页面何时完全加载到页面卷曲效果中?
【发布时间】:2013-07-25 04:42:01
【问题描述】:

我在我的应用程序中实现了Page Curl Effect by harism

现在我需要在页面顶部做一些文字动画。我可以将文本放在页面上,也可以制作动画。但是,我需要知道卷曲效果何时完成以及下一页/上一页已完全加载,因为我需要使 TextView 不可见并在页面卷曲效果正在进行时停止动画。

我一直在努力寻找页面何时完全加载/页面卷曲动画何时完成。我还在问题部分和android-developers forum on Google Groups 的 github harism 存储库上发布了我的问题,但没有收到任何回复。希望能在这里得到一些帮助。

谢谢!

【问题讨论】:

    标签: android animation curl textview page-curl


    【解决方案1】:

    CurlView 类中有 onDrawFrame 方法。在那里您可以看到可以确定页面是否已完全加载的代码部分:

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

    和 如果是正确的页面卷曲

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

    【讨论】:

      猜你喜欢
      • 2015-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-30
      • 2020-01-08
      • 2012-12-07
      • 1970-01-01
      • 2013-01-12
      相关资源
      最近更新 更多