Uday
Uday

Reputation: 6023

android:configChanges="keyboardHidden|orientation" Issue Android

Am using android:configChanges="keyboardHidden|orientation"for switching between portrait and landscape modes. But when user opens softkeyboard in portrait and changes to landscape keyboard should hide or dissappera but its not happening with that.

Upvotes: 1

Views: 3068

Answers (2)

Shlublu
Shlublu

Reputation: 11027

If you are intercepting orientation without overriding public void onConfigurationChanged(Configuration newConfig) in your Activity it is normal that the keyboard remains open.

You can either

  • override this method to reset the display

  • or avoid intercepting orientation to let the Activity restart (in which case your Activity will be reinitialized and onCreate() will be called again)

Upvotes: 2

Zwiebel
Zwiebel

Reputation: 1615

I'm not sure in it but I think that you need to write keyboardHidden|orientation|portrait (or landscape).

Upvotes: 0

Related Questions