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
  • 4,997
  • 8
  • 26
  • 51
CMA
  • 2,618
  • 5
  • 27
  • 39

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
  • 38,448
  • 27
  • 90
  • 102