Page Curl in Android
There are some open source projects that can be used to achieve the Page curl feature. This android project or this Github Project can be used to achieve the feature. The Android page curl project uses only Canvas to render a 2D curl effect. Since it does not use OpenGL, it can be implemented for any Android Version. The Github PageFlip project uses OpenGL 2.0 to produce a 3D page curl effect.
Implement page curl on android?
I just created a open source project which features a page curl simulation in 2D using the native canvas: https://github.com/moritz-wundke/android-page-curl
I'm still working on it to add adapters and such to make it usable as a standalone view.
- EDIT: Links updated.
- EDIT: Missing files has been pushed to repo.
Try to implement a page curl example in android from here
You have to replace:
@Override
public int getPageCount() {
return 5;
}
with:
@Override
public int getPageCount() {
return mBitmapIds.length;
}
Then, modify the calls to "loadBitmap" method (within the "updatePage" method) replacing the last parameter (it has a fixed number) with the "index" variable. Furthermore, you can get rid of the whole switch and configure the pages like you wish (just extract the code from the switch-case you want).
UPDATE1
Use this method:
@Override
public void updatePage(CurlPage page, int width, int height, int index) {
Bitmap front = loadBitmap(width, height, index);
page.setTexture(front, CurlPage.SIDE_BOTH);
page.setColor(Color.argb(127, 255, 255, 255), CurlPage.SIDE_BACK);
}
Page Curl Animation in android?
I found one sample code.
youtube
mediafire
Related Topics
Cannot Get Folderid That I Just Created on Google Drive
Android 4.3 Bluetooth Low Energy Unstable
What's "Tools:Context" in Android Layout Files
How to Get the APK of an Installed App Without Root Access
How to Prevent System Font-Size Changing Effects to Android Application
Android Animationdrawable and Knowing When Animation Ends
How to Compile the Android Aosp Kernel and Test It with the Android Emulator
Resolved Versions for App (22.0.0) and Test App (21.0.3) Differ
Connectivitymanager Getnetworkinfo(Int) Deprecated
Listview with Onitemclicklistener
How to Apply a Style to All Buttons of an Android Application
Change the Color of a Checked Menu Item in a Navigation Drawer
How to Do a Simple Search in String in Firebase Database
Android Log.V(), Log.D(), Log.I(), Log.W(), Log.E() - When to Use Each One