1

How to properly handle screen orientation change in android? Whenever i change the orientation of my phone or whenever I rotate my phone, my activity crashes and will force close.

Stefan
  • 5,203
  • 8
  • 27
  • 51
CMA
  • 2,758
  • 5
  • 28
  • 40

1 Answers1

0

Activity restarts when the orientation changes.

If you want to avoid orientation changes , then disable it using android:screenOrientation="portrait" (or landscape) in the manifest.
check here,
http://developer.android.com/guide/topics/resources/runtime-changes.html

Handling configuration changes yourself.

sat
  • 40,138
  • 28
  • 93
  • 102