I am using a viewpager to display the contents of a folder. Between pages I have a page size of 96 pixels. To handle configuration changes, I added the following lines to AndroidManifest.xml:
<activity android:name="SimpleFilePreviewerActivity" android:configChanges="keyboardHidden|orientation|screenSize" > </activity>
Starting from the leftmost page, everything is processed as desired when I rotate my device. However, on the following pages, after the rotation, the view is no longer centered on the screen; instead, it has an offset that becomes even worse when the ViewPager scrolls further to the right.
If you touch the screen after rotating the screen, the displayed image will be centered again. This offset only occurs when the page margin is specified with a grater, and then 0.
Is this a known bug? Is there any way to face this bias problem?
Thanks in advance,
Flo
source share