与 android.hardware.touchscreen 混淆
我将支持未配备触摸屏的 Android 设备,
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
但我仍然有一些疑问。例如,我的应用程序 UI 的基本部分是基于上下文菜单构建的,长按 EditText
和 ImageView
小部件就会出现该菜单。
我只是想知道设备是否缺少触摸屏如何操作上下文菜单功能?有人可以告诉我吗?
I'm going to support Android devices not equipped with touch screens putting in manifest
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
But still I do have some doubts. E.g. essential part of my application UI is built upon context menus, which appears on long tap of EditText
and ImageView
widgets.
I just wonder if device is lacking touch screen how operates context menu functionality? Can someone tell me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据最新的 Android 兼容性定义文档 (CDD),每个 Android 设备都必须具有触摸屏输入。但这个要求很早就提出了,我已经能够追踪到Android 1.6了。我无法跟踪 Android 1.5 CDD,但我也不记得任何不支持触摸屏的 Android 1.5 手机。
因此,您现在可以忽略不支持触摸屏的设备。它们在 Android 市场中不存在。并且
仅对市场有用,Android 系统在安装应用程序之前不会检查设备上是否有匹配的功能支持。Android 兼容性:http://source.android.com/compatibility/
Android 1.6 CDD(参见第 8.5 节):http ://source.android.com/compatibility/1.6/android-1.6-cdd.pdf
Android 2.1 CDD(参见第 8 节):http ://source.android.com/compatibility/2.1/android-2.1-cdd.pdf
最新的 Android CDD:http://source.android.com/compatibility /2.3/android-2.3.3-cdd.pdf
来自 Android 2.3 CDD:
According to latest Android Compatibility Definition Document (CDD) each android device must have touchscreen input. But this requirement was introduced much earlier, I've been able to track it up to Android 1.6. I haven't been able to track Android 1.5 CDD, but I can't recall any Android 1.5 phone without touchscreen support either.
So you can just ignore the devices without touchscreen support for now. They are non-existent in Android Market. And
<uses-feature>
is only useful for market, Android system does not check for matching feature support on the device before installing an application.Android Compatibility: http://source.android.com/compatibility/
Android 1.6 CDD (see section 8.5): http://source.android.com/compatibility/1.6/android-1.6-cdd.pdf
Android 2.1 CDD (see section 8): http://source.android.com/compatibility/2.1/android-2.1-cdd.pdf
Latest Android CDD: http://source.android.com/compatibility/2.3/android-2.3.3-cdd.pdf
From Android 2.3 CDD: