bluetooth keyboard will cause activity destroy and recreate

前端 未结 2 1843
庸人自扰
庸人自扰 2021-01-04 10:09

Bluetooth keyboard will cause activity destroy and recreate if I turn off it or far away from pad(Android) Activity will be recreate how can i avoid this problem

2条回答
  •  梦毁少年i
    2021-01-04 10:49

    In contrast to the accepted answer, I found that keyboard|keyboardHidden was not enough. I was working with a Logitech Bluetooth keyboard (model #JNZYR0021).

    What did work was this:

    
    

    Apparently this Logitech keyboard also changes navigation, which is weird because the Android docs say:

    The navigation type (trackball/dpad) has changed. (This should never normally happen.)

    Go figure.

提交回复
热议问题