Mobile orientation problem

  • Replies:1
Anirban Sarkar
  • Forum posts: 1

Oct 27, 2014, 11:10:26 AM via Website

Hello,

I want to stop refreshing the page when the orientation of the mobile phone is changed. As it is getting reloaded, any backend database value is also getting cleared.

My script is in php and the backend is in mysql. I am compiling my script to make an application that in turn will be accessed from a mobile phone.

Any early help in this respect will be highly appreciated.

Regards,

Anirban

Reply
Kevin Berendsen
  • Forum posts: 118

Nov 7, 2014, 11:25:09 AM via Website

I experienced the very same problem more than a year ago. I fixed it by adding the following line to my activity in my manifest.

android:configChanges="orientation|screenSize"

It'd look like this, just an example:

<activity
    android:name=".YourActivityName"
    android:configChanges="orientation|screenSize">
</activity>

Copied from a stackoverflow post.

Reply