Issue
I want my application to run with minimum api level 8...I tried with android:configChanges="orientation|keyboardHidden"..In lower versions,onConfigurationchanged() method is getting called and orientation is handled..but when i run in 3.2 and higher versions onConfigurationchanged() is not called and activity is re-created. So i added android:configChanges="orientation|keyboardHidden|ScreenSize" but when i compiled this my application cannot run in versions below 3.2 ICS..what should i do to handle the configuration change in all versions from 2.2 to 4.0.1 without re-creating the activity?
Solution
Did you set the targetSdkVersion
in the manifest? For example,
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
Your code should work as long as your targetSdkVersion
is greater than or equal to 13
. Make sure you are building your project against SDK version 3.2
or greater as well.
Answered By - Alex Lockwood
Answer Checked By - Mary Flores (JavaFixing Volunteer)