2

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

Kanika
  • 10,648
  • 18
  • 61
  • 81

1 Answers1

4

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);
anddev
  • 3,144
  • 12
  • 39
  • 70
  • Ok Kanika.. You are most welcome.. It would be nice if you are accept this answer as a answer if it is really helps you then. – anddev Dec 13 '11 at 08:12
  • @mpp i want to use this page curl in my app.Please help me. My question is http://stackoverflow.com/questions/10779862/how-can-i-show-page-on-full-screen-in-curl-animation-also-on-click-of-the-button – Naresh Sharma May 28 '12 at 06:08
  • @Naresh I posted link for sample code for page curl. I hope it'll help you. Please refer that example you will get your answer from that surely. – anddev May 28 '12 at 11:32
  • @mpp i want to use the curl animation on click of the button can i do this from that code ? – Naresh Sharma May 28 '12 at 11:36