I have to change Theme of activity when users feels like changing it. For that,I have to call recreate() after setting theme to activate the Theme. But my Activity gets data from web and displays to user in a Recycler view. every time the theme changes,The data is being refreshed, I need to prevent this.
Is there any possible way to save data when calling recreate() other than saving in a database ?
I tried overriding onSaveInstanceState(); but savedInstanceState in onCreate() seems to be 'null' when recreate is called.