如何检测硬件键盘的存在? [英] How to detect hardware keyboard presence?

查看:21
本文介绍了如何检测硬件键盘的存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法检测我当前运行的设备是否安装了硬件键盘?

Is there a way to detect if the device I'm currently running on has a hardware keyboard installed?

我如何查询设备功能?

推荐答案

"getResources().getConfiguration().keyboard 提供的标志是一个检查哪个键盘(如果有)可用的好方法." [1]

"The flags provided by getResources().getConfiguration().keyboard are a good way of checking which keyboard (if any) is available." [1]

http://d.android.com/reference/android/content/res/Configuration.html#keyboard

这篇关于如何检测硬件键盘的存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆