Charisma Android Page Curl

I am using harism android page curl . It works brilliantly. My application works in landscape mode, and I want to start with an open book. When I work in landscape mode, the wireframe automatically installs

SHOW_TWO_PAGES

properties.

Now, when the application starts on the right side, I see PAGE0.PNG, this is my first page of the book, and on the left side is empty space.

Instead, I want PAGE0.PNG on the left side and PAGE1.PNG on the right side. How to do it?

+6
source share
1 answer

This can be done by adding mCurlView.setCurrentIndex(1); to the SizeChangedObserver class in CurlActivity .

Watch it

 private class SizeChangedObserver implements CurlView.SizeChangedObserver { @Override public void onSizeChanged(int w, int h) { if (w > h) { mCurlView.setViewMode(CurlView.SHOW_TWO_PAGES); mCurlView.setMargins(.1f, .05f, .1f, .05f); mCurlView.setCurrentIndex(1); //--- Add this line.. } else { mCurlView.setViewMode(CurlView.SHOW_ONE_PAGE); mCurlView.setMargins(.1f, .1f, .1f, .1f); } } } 
+1
source

Source: https://habr.com/ru/post/951941/


All Articles