Possible duplicate:ViewPager and slices - what is the way to save fragment state?
How to save a fragment? (He is in action) When I rotate the screen, restarting the action, the fragment is recreated
You need to add orientation in android: configChanges in your AndroidManifest.xml. For instance:
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
try using setRetainInstance(true); in your onCreate snippet
setRetainInstance(true);
Source: https://habr.com/ru/post/1432267/More articles:Rails 3 with Authlogic and a call to reset_session - ruby-on-railsKineticJS mouse event issue - javascriptBy default MongoDB serialization of public objects - c #getting contacts from a specific group in android - androidPath with spaces in the batch file loop - batch-fileHow to handle spaces in path names in a for loop? - batch-fileHow to capture exit code when using open / print to execute an SQL statement? - perlUse target area as an association condition - scopeCreate a self-signed CA certificate using makecert.exe - windowspython and basemap and remove mexico / canada from view - pythonAll Articles