Roland Roland - 1 year ago 69
Android Question

Losing data when rotate screen

I have a little funny bug in my application. When the user rotates the screen I lose some of the data in my activity. Anyone that have an idea of why this happens?

Thanks in advance

Answer Source

By default, when the screen is rotated your Activity is killed and restarted. To make sure no data is lost, you need to properly save and restore your data using the lifecycle methods. See Saving Persistent State.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download