Quantcast
Channel: Android SavedStateHandle doesn't save in ViewModel - Stack Overflow
Browsing all 2 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Answer by Aliaksandr Chaulytka for Android SavedStateHandle doesn't save in...

"Then I force-close my app and relaunch it.."I guess you kill the app completely =)One of the way for reproducing saveState case you need:Enable developers mode and check Don't keep activitiesProcess...

View Article



Android SavedStateHandle doesn't save in ViewModel

I have a ViewModel which takes a SavedStateHandle parameter. I am saving a String in there like this: private fun saveString(str: String) { state.set(KEY_STRING, str) }Then I force-close my app and...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images