2014-03-25 54 views
0

清单:“keyboardHidden |方向|屏幕尺寸” onConfigurationChanged不叫

<activity 
    android:windowSoftInputMode="stateUnspecified|adjustResize" 
    android:name="com.sample.MainActivity" 
    android:screenOrientation="sensorLandscape" 
    android:configChanges="keyboardHidden|orientation|screenSize" 
    android:label="@string/app_name" > 
    <intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 
</activity> 

而当我显示或隐藏键盘,旋转屏幕从来没有所谓的onConfigurationChanged。

谁知道为什么?

+0

访问http://stackoverflow.com/questions/5620033/onconfigurationchanged-not-getting-called –

+0

显示你的代码请 –

回答

1

线

android:screenOrientation="sensorLandscape" 

默认意味着应用程序不会处理任何方向的变化。尝试删除此行并再次测试?