开发者

onConfigurationChange() is not called

I found that in my app , onConfigurationChange() is not call. In manifest I put :

android:configChanges="keyboardHidden"

I want that when the keyboard is hide, onConfigurationChange() to be called. Why it is not called?

The method is not called when I force keyboard to be hid开发者_JAVA百科e?


This question has been asked many times, a common answer is:

android:configChanges="orientation|keyboardHidden" rather than
android:configChanges="keyboardHidden"

From This Page


Hey i had the same problem as you. I don't know if it will work but i think it's worth a try. I just put android:configChanges="orientation|keyboardhidden" in all my activities i had declared in my AndroidManifest.xml so i had something like this :

    <activity 
        android:name=".appActivity"
        android:configChanges="keyboard|orientation" />                     
    <activity android:name=".app1Activity"
        android:configChanges="keyboard|orientation" />
    <activity android:name=".app2Activity"
        android:configChanges="keyboard|orientation" />             
    <activity android:name=".app3Activity"
        android:configChanges="keyboard|orientation" /> 

I tried toggling a breakpoint inside the method and it worked so you might want to try that as well, you never know!

Sorry if this doesn't help!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜