Onconfigurationchanged Is Not Getting Called Any Time In Android
I have create sample program to test Orientation. If portrait mode and I tilt the phone the other way round I want my sample app to reversePortrait. After reading lot of questions
Solution 1:
I had a same issue after changing target API to 19(4.4 kitkat) You need to add layoutDirection attribute for targeting higher than version 17.
my attribute looks like:
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|layoutDirection"
The key is to add 'layoutDirection'
Solution 2:
I just encountered this problem, and fixed it with this weird little trick.
Set your screenOrientation
in your manifest, like so:
android:screenOrientation="sensor"
That fixed it for me.
Solution 3:
Your code is no problem Modify your manifest.xml android:configChanges="orientation|keyboardHidden" I hope it can help you
Post a Comment for "Onconfigurationchanged Is Not Getting Called Any Time In Android"