quran / quran_android

a quran reading application for android
http://android.quran.com
GNU General Public License v3.0
1.95k stars 881 forks source link

Rotating screen back and forth loses track #2736

Open aalhossary opened 3 weeks ago

aalhossary commented 3 weeks ago

If you set the application to show 1 page in the portrait orientation and 2 pages side by side in the landscape orientation (I think you call it tablet view?) and allow auto rotate, then when the phone is showing the left page in the portrait position and for whatever reason, the phone goes to landscape position (e.g. i shake my hand), the app will go to the 2 pages view then returns always to the RIGHT page, not to the current (i.e. left page).

The solution should be to track the actual page number, which may or may not be the visible page number when in the 2 pages view mode, do some integer division to set the visible reference page number to the current page, then when you return to the portrait view, set the visible page number to the actual number. [variable names are can change].

I can volunteer to do it. please guide me to where you save and restore the page numbers.

Amr