próbuję wartości sklep z ArrayList w onSavedInstanceState()
i uzyskać wartości z listy tablicy w metodzie onCreate ale podnosi eeror jak w stanie wstrzymać AktywnośćJak przechowywać wartości w onSaveInstanceState() i retrive?
Oto mój kod
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putParcelable("Old", (Parcelable) profileDetails);
super.onSaveInstanceState(savedInstanceState);
}
aw My onCreate()
if (savedInstanceState != null) {
profileDetails= (ArrayList<ProfileDetails>)savedInstanceState.getParcelable("Old");
}
else {
profileDetails = GetSearchResults();
}
Spróbuję i dam znać! –