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

本文是小编为大家收集整理的关于页面卷曲动画-问题的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在开发一个项目,其中在一个按钮点击时在同一视图上,内容已更改.例如

假设有5个问题和下一个问题,点击,问题和答案将从1-5个问题中改变.而且我想在按钮单击...

上实现页面卷曲动画

我从github https://github.com/harism/android_page_curl ,但仍然与如何在我的应用程序中实现这个项目作为库,

让我可以使用页面卷曲动画当用户点击下一页和上一个按钮时,任何人都可以指导我进入这个,如何在下一个按钮单击...

谢谢.....

推荐答案

我已经使用过page curl示例..我发布了我的代码..我希望它能帮助你.. 在下一个按钮单击"写入下面代码: -

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.来自在这里.

您可以设置"McurledgePaint"的颜色.并将背景放在这条行中

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

本文地址:https://www.itbaoku.cn/post/102364.html

问题描述

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

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...

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,

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...

Thanks.....

推荐答案

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);

You can get PageCurlView.java. from here.

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);