在ICS上区分平板电脑和智能手机 [英] Distinguish between Tablet and Smart phone on ICS

查看:34
本文介绍了在ICS上区分平板电脑和智能手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道默认情况下(在 ICS 之前),要区分平板电脑和智能手机,开发者可以使用 Android Manifest 中的 sdk 版本(除了屏幕尺寸和 openGL 过滤器).现在 ICS 同时运行在 SP 和平板电脑上,如果我需要区分 SP 和平板电脑,开发人员有哪些选择?

I understand that by default (pre ICS), to distinguish between a Tablet & Smartphone, a developer can use the sdk version in the Android Manifest (apart from screen size and openGL filters). Now with ICS running on both SP and Tablet, what options does a developer have in case I need to distinguish between SP and Tablet?

我认为屏幕尺寸不可靠.

I don't think screen size is reliable.

假设出于某些原因,我无法为 SP 和平板电脑使用通用的 apk.我还想避免为平板电脑和 SP 单独申请

Lets say for certain reasons I cannot have a common apk for SP and Tablet. I would also like to avoid a separate application for Tablets and SP

推荐答案

一般来说,平板电脑和手机之间唯一显着的区别是屏幕尺寸和电话功能的存在,另外还有一个事实,即手机通常具有移动数据,而平板电脑可能仅支持 wifi.有了ICS,这两类设备上运行的软件基本相同,所以唯一有趣的区别就是这几点.如果设备有足够大的屏幕来容纳您的应用并提供所有必需的功能,那么它是手机还是平板电脑重要吗?

The only significant differences between tablets and phones are, in general, screen size and the presence of telephony capabilities, plus the fact that phones will generally have mobile data while tablets may be wifi-only. With ICS, the software running on the two classes of device is basically the same, so the only interesting distinguishing features are these points. If a device has a screen big enough for your app and provides all the required capabilities, does it matter if it's a phone or a tablet?

我会说屏幕尺寸正是您应该过滤的.与其说是手机版"、平板版",不如说是小屏"和大屏".

I'd say that screen size is exactly what you should be filtering on. It's not 'phone version' and 'tablet version' so much as 'little screen' and 'big screen'.

这篇关于在ICS上区分平板电脑和智能手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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