Android: how to prevent the physical keyboard from restarting the application

I have android:screenOrientation="portait", but when the physical keyboard opens, it does not rotate the screen the way I wanted, but it restarts the application. It seems to work again or again. Can someone point me in the right direction and / or tell me how to intercept this and handle it? Thank.

+3
source share
2 answers

I think this has already been answered:

Restart activity during Android rotation

0
source

Besides android:screenOrientation="portait"try addingandroid:configChanges="keyboardHidden|orientation|keyboard"

+4
source

Source: https://habr.com/ru/post/1774651/


All Articles