如何检测硬件键盘presence? [英] How to detect hardware keyboard presence?
本文介绍了如何检测硬件键盘presence?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法来检测,如果我当前正在运行的设备已安装了硬件键盘?
Is there a way to detect if the device I'm currently running on has a hardware keyboard installed?
我如何查询设备的能力呢?
How do I query device capabilities anyway?
推荐答案
)通过getResources()提供的标志。getConfiguration(键盘是 检查的好方法哪个键盘(如果有的话)是可用的。 [1]
"The flags provided by getResources().getConfiguration().keyboard are a good way of checking which keyboard (if any) is available." [1]
<一个href="http://d.android.com/reference/android/content/res/Configuration.html#keyboard">http://d.android.com/reference/android/content/res/Configuration.html#keyboard
这篇关于如何检测硬件键盘presence?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文