One difference to between conventional programming and Android development is that the Android OS can at any time kill your Activity if it runs low on resources or in certain other conditions like configuration changes.
This can be very critical when it comes to data. On such an event, there is a possibility that data loss will occur and as programmer you want to avoid that under any circumstances.
Most of the standard widgets like EditText already preserve their state under certain circumstances. By default widgets/UI elements with an android:id attribute defined, will by default preserve their states when the application is destroyed and recreated.
But what if the you need to preserve data defined inside of your Activity or your own widgets?
Continue Reading »
SavedState: Preserve data when your Activity is recreated – Part 1





