如何确定Android设备是否具有触摸屏? [英] How to determine if an Android device has a touchscreen?

查看:119
本文介绍了如何确定Android设备是否具有触摸屏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花费大量时间使我的UI仅能使用键盘输入.但是最后我不确定我是否可以依靠Android设备都具有触摸屏的假设.

I'm spending considerable time in making my UI to work with keyboard input only. But in the end I'm not sure whether I can rely on the assumption that Android devices all have touch screens.

是否可以确定Android设备是否具有触摸屏?

Is there a way to determine if an Android device has a touch screen?

推荐答案

您应该研究现有设备并阅读

You should research the existing devices and read the Android Compatibility Definition Document (CDD) and decide for yourself.

我花了很多时间试图自己解决这个问题.上面的标语是正确的,表明Android已经为一些非触摸设备供电,并且将在不久的将来为Google TV供电,但是目前,CDD明确要求所有Android设备必须具有触摸屏.

I have spent some considerable time trying to figure out this problem for myself. The posters above are correct that Android already powers some non-touch devices and will power Google TV in the near future, but as it currently stands, the CDD specifically requires that ALL Android devices MUST have a touchscreen.

基本上,创建了Android兼容程序来对冲

Basically, the Android Compatibility program was created to hedge against the sort of fragmentation issues you're worrying about now. It lists a bunch of requirements, and if a device does not meet those requirements, it does not get access to Android Market. These requirements include a touchscreen, wireless communication, bluetooth, a camera, and much more.

如果您研究这些平板电脑和上网本,则会发现没有一个承载着Android电子市场.Augen最近尝试使用其新的GENTOUCH 78平板电脑快速拉出,但不得不

If you research those tablets and netbooks, you will find that not a single one carries the Android Market. Augen recently tried to pull a fast one with their new GENTOUCH 78 tablet, but had to rescind their claims that the tablet would carry Android Market after being shot down by the Android Compatibility Team.

因此,如果您仅通过Android Market分发应用程序,则无需担心,直到Google更改CDD.但是,如果您想在其他应用程序商店中提供该应用程序或直接下载该应用程序,则必须担心关键模式导航问题.

So, if you are only distributing your app through Android Market, you have nothing to worry about until Google changes the CDD. But if you'd like to offer your app on other app stores or as a direct download, then you'll have to worry about your key mode navigation issues.

如果有什么安慰的话,我发现很多应用程序都存在完全相同的问题.没有触摸屏就无法使用它们.他们中的许多人在聚焦和软键盘方面也存在严重问题.有时,键盘在应隐藏时会停留在上面.有时,无论您单击EditText多少次,都无法弹出键盘.IMO,Android框架无法很好地处理这些问题.

If it's any consolation, I have found that many, many apps have the exact same problem; they are impossible to use without a touchscreen. Many of them also have serious issues with focus and the soft keyboard. Sometimes the keyboard stays up when it should be hidden. Sometimes you can't get the keyboard to pop up no matter how many times you click on an EditText. IMO, the Android framework does not handle these things all that well.

鉴于所有这些,看看Google TV如何适应所有这一切肯定会很有趣.他们会更新CDD使其与机顶盒兼容吗?他们会为Google TV实施使用不同的SDK和CDD吗?当涉及到Google TV时,他们会完全忽略兼容计划吗?你的猜测和我的一样.

Given all that, it will certainly be interesting to see how Google TV fits into all this. Will they update the CDD to be compatible with their set-top boxes? Will they use a different SDK and CDD for Google TV implementations? Will they ignore the Compatibility Program altogether when it comes to Google TV? Your guess is as good as mine.

更新:
似乎Google的某个人终于挺身而出,承认Android尚未准备好在平板电脑上运行:
http://phandroid.com/2010/09/10/shocker-google-says-android-not-meant-for-tablets-in-its-current-state/

对我来说,这表示Google并未为加速采用Android操作系统做好准备,也没有充分地为该平台的未来打下基础.几乎不可能支持大于480x800的屏幕,而三星只能通过在Galaxy Tab上与Google紧密合作来做到这一点.因此,我不确定我们是否需要在不久的将来担心非触摸屏设备.我敢肯定,它们最终会在这里,但是当它们到达时,我们可能会看到一个专门针对这些应用程序的应用程序市场,或者在现有市场上有一些更改的过滤方案,一个新的CDD,谁知道.

To me, this says that Google was not prepared for the accelerated adoption of the Android OS and has not adequately roadmapped the future of the platform. Supporting screens larger than 480x800 is barely possible, and Samsung was only able to do it by working closely with Google on the Galaxy Tab. So I'm not so sure we need to worry about non-touchscreen devices in the near future. They'll be here eventually, I'm sure, but when they do arrive we may see a separate app market just for those, or some altered filtering scheme on the existing market, a new CDD, who knows.

对我来说,这表示Google仍在耳边演奏,我们只需要做同样的事情即可.

To me, this says that Google is still playing it by ear, and we'll just have to do the same.

这篇关于如何确定Android设备是否具有触摸屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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