卷页动画 - 问题 [英] Page curl animation - issue

查看:131
本文介绍了卷页动画 - 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发中,在同一个视图当按钮点击,内容得到了改变的项目。例如

I am developing a project in which on the same view when a button clicks, the contents got changed. e.g.

假设有5个问题,并在单击Next按钮,问题和答案将发生变化,从1-5的问题。我想实现按钮点击页面卷曲的动画...

suppose there are 5 questions and on next button click, the questions and answers will change, from 1-5 questions. and I want to implement page curl animation on button click...

我的页面卷曲动画$ C $从github上 https://github.com/harism/android_page_curl ,但仍混淆如何实现我的应用程序这一项目作为一个库,

I got the page curl animation code from github https://github.com/harism/android_page_curl , but still confused with how to implement this project as a library in my application,

,这样我就可以使用页面卷曲的动画时,旁边和previous按钮,用户点击,任何人都可以pplss引导我到这一点,我怎么能实现在单击Next按钮此code ...

so that I can use the page curl animation when the user click on next and previous button, can anyone pplss guide me into this, how can I implement this code on next button click...

感谢.....

推荐答案

我用卷页的例子..我张贴我的code ..我希望它可以帮助你.. 在接下来的按钮点击以下code写的: -

I had used Page Curl example.. I am posting my code.. I hope it helps you.. On next button click write below code:-

PageCurlView pageCurlView = new PageCurlView(this, true);              
// If you would like to see the on-screen debug info
pageCurlView.bDrawDebug = true;
this.setContentView(pageCurlView);

您可以得到PageCurlView.java。从这里

You can get PageCurlView.java. from here.

您可以设置mCurlEdgePaint的颜色。并把你的背景在这行

You can set color of "mCurlEdgePaint". And put your background in this lines

mBackground = BitmapFactory.decodeResource(context.getResources(),R.drawable.background_main);
mForeground = BitmapFactory.decodeResource(context.getResources(),R.drawable.background_main_bg);

这篇关于卷页动画 - 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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