問題描述
藍牙鍵盤會導致activity破壞并重新創建如果我關閉它或遠離墊(Android)將重新創建活動我怎樣才能避免這個問題
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
推薦答案
配對藍牙鍵盤被認為是配置更改:嘗試將以下內容添加到您的 AndroidManifest.xml
Pairing a Bluetooth keyboard is considered to be a configuration change: Try adding the below to your AndroidManifest.xml
android:configChanges="keyboard|keyboardHidden"
android:configChanges="keyboard|keyboardHidden"
來自:http://developer.android.com/guide/topics/manifest/activity-element.html#configandroid:configChanges
From: http://developer.android.com/guide/topics/manifest/activity-element.html#config android:configChanges
這篇關于藍牙鍵盤將導致活動破壞并重新創建的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!