Android Page Curl Animation by Harism shows inconsistency in the reverse index count in the getBitmap() method of CurlActivity()?

后端 未结 2 1201
一向
一向 2020-12-18 14:39

I have used Harism\'s Page Curl animation for my application, but I have been facing a small problem, I am using the index Value in the getBitmap() method of th

2条回答
  •  庸人自扰
    2020-12-18 14:47

    Problem is that you really can't rely on requested page index on purpose you try to implement. Reason for the behavior you're facing is that once you flip through pages forward, only 'next page' is requested, in which case index seems to be what you're expecting. But changing pages backwards works the exact opposite, only 'previous page' is requested, and there's a gap within index between these separate operations.

    There's a method CurlView.getCurrentIndex() though which is constantly set to index of the page being shown on right side. It should give you means for having actual page numbers shown.

提交回复
热议问题