In my app I have a TextView that I use setText on after a certain action.
But when the orientation changes the TextView’s text is changed back to normal.
I have a similar problem with my app’s file browser, for some reason it goes back to /sdcard/ when the orientation changes :/
Is there anything I can do to prevent loosing the TextView’s text?
Store all your view’s contents in
onSaveInstanceState()and reload it inonCreate(). If you want to be funny and have all those values persist even after a system reboot, you could useSharedPreferences, but saving the instance state is probably what you want here.