开发者

Android: page curl effect like iphone

开发者 https://www.devze.com 2023-03-07 15:05 出处:网络
I want to create half page curl animation effect as shown in image:开发者_运维问答 I\'ve used code from https://github.com/harism/android_page_curl/ , but it turns whole page. I just only want half

I want to create half page curl animation effect as shown in image:开发者_运维问答

Android: page curl effect like iphone

I've used code from https://github.com/harism/android_page_curl/ , but it turns whole page. I just only want half page curl effect as shown in image.


You could try to modify my implementation. It's not 3D but a nice 2D simulation using the plain canvas: http://code.google.com/p/android-page-curl/

If you enbale the debug mode you will see how it works and modifying the curl plane should be easy.


It is enough to change part of code at updatePageRects() method in CurlRenderer class:

mPageRectRight.bottom = (mPageRectRight.bottom - mViewRect.height() * mMargins.bottom)/5;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号