I am new to android application.
My Android application works well on emulator but running on real android device (Softbank 003 SH), when I rotate the device from portrait to landscape, the application stop unexpectedly.
Do you have any hint to solve this problem?
I am new to android application. My Android application works well on emulator but
Share
when rotate the device from landscape to portrait will re-create the activity so thread will stop and if any builder is running will cause a error so :
Start by adding the
android:configChanges node to your Activity’s manifest node
Then within the Activity override the onConfigurationChanged method and call setContentView to force the GUI layout to be re-done in the new orientation.