Dropped Data

Context

UI

Affects

User Experience,User Conformity

Problem

The user can input or edit data in an Activity or Fragment. Then another activity pops up (incoming phone call) and the input is lost.

Refactorings

Save instance state

Resolves

User Conformity,User Experience

Affects

Solution

The developer has to ensure that the state of the Activity or Fragment is stored, when the user inputted data. This is usually done in onSaveInstanceState(Bundle outState). It can be restored by overriding onRestoreInstanceState(Bundle).

Links

Links

Related