0

Is it possible to save Stack instance state in onSaveInstanceState(Bundle savedInstanceState) method in Activity?

I tried but i can't able to find a way to do that. Anyone, Please suggest me that is it possible or not. If possible how to do that?

Thanks.

Update

It is not a duplicate question. @androbin noted the same question which i mentioned earlier in the answer. Still the alternate question is denoting Hashmap where as my question is related to Stack. So I think it is not equivalent to the mentioned question.

Mahendran Sakkarai
  • 8,381
  • 6
  • 44
  • 66
  • Possible duplicate of [Android HashMap in Bundle?](http://stackoverflow.com/questions/11452859/android-hashmap-in-bundle) – Androbin Feb 22 '17 at 13:50

1 Answers1

0

Got that :)

I can able to use savedInstanceState.putSerializable("key", stackInstance). Because Stack implements Serializable by default. I got this idea from this answer.

Special thanks for @ρяσѕρєя-k

Community
  • 1
  • 1
Mahendran Sakkarai
  • 8,381
  • 6
  • 44
  • 66