kuhrusty / MorbadScorepad

DUNGEON DEGENERATES support app.
GNU General Public License v3.0
7 stars 0 forks source link

SkillListActivity doesn't save state #8

Open kuhrusty opened 6 years ago

kuhrusty commented 6 years ago

Every time you rotate the screen, the cached list of skills etc. gets thrown away & reloaded, which kind of blows the point of caching it. You may need to make the configuration & repository objects (and everything they contain) Parcelable & store them in onSaveInstanceState()/onRestoreInstanceState().

Related to this, the currently-selected skill doesn't get saved across onDestroy()/onCreate(), probably because you're dynamically building the list of skill-name UI components. (But aren't you also doing something similar for the adventurer name? That gets persisted correctly.)