For questions related to Android's onSaveInstanceState and onRestoreInstanceState methods.
Questions tagged [android-savedstate]
197 questions
-1
votes
2 answers
Exception parsing SharedPreferences
I am saving LatLng coordinates. Method looks like this:
@Override
protected void onPause() {
markerList.clear();
sharedPreferences=getPreferences(Context.MODE_PRIVATE);
editor=sharedPreferences.edit();
key =0;
for (LatLng…

fixxxera
- 205
- 2
- 10
-2
votes
1 answer
Saving a variable when exiting an application
I am really new to Android Studio(I just started yesterday) and I'm coding a sort of clicker game(in XML and kotlin).
I wanted the click counter (which is in a textview with a text at the begining) to save when leaving the app and loading when…

Mathieu Antunes
- 1
- 3