Reputation: 1446
I build an app which shows 3 random images from an SQLite database. But when I rotate my device to landscape mode, the random images are changed.
I don't want that actually, what I want is the 3 random images stay still either on portrait or landscape mode.
Upvotes: 0
Views: 381
Reputation: 15267
Add below property in your manifest in that particular Activity
node.
android:configChanges="keyboardHidden|orientation"
Upvotes: 3
Reputation: 10028
The reason for this happening is that the Activity is re-created when rotating to landscape mode. There are various ways around this:
Upvotes: 0