Orientation changes in Android #143108
Replies: 1 comment
-
To handle orientation changes without using 1. Use
|
Beta Was this translation helpful? Give feedback.
-
To handle orientation changes without using 1. Use
|
Beta Was this translation helpful? Give feedback.
-
Body
I'm using android:configChanges="orientation|screenSize" in my AndroidManifest.xml, and I've created separate layout and layout-land folders. However, when I change my phone's orientation, the activity refreshes, and the data resets each time. I want to handle this without using ViewModel. Does anyone know how to prevent the activity from restarting or preserve data across orientation changes in Android Studio?
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions