English 中文(简体)
安卓网络浏览器分辨率有什么问题?
原标题:What s the deal with Android web browser resolution?

以下是同一款安卓手机的两张图像,一张处于纵向模式,一张位于横向模式。

alt text alt text

难道一个决议不应该与另一个相反吗?即,如果一个是800x1360,另一个应该是1360x800?这是怎么回事?如果我在ipod touch上尝试相同的东西,无论方向如何,它都会报告相同的分辨率。此外,在安卓手机上,当你放大、缩小或滚动页面时,分辨率似乎会发生变化。

我正试图弄清楚如何在CSS中处理android手机的“报告”分辨率,在我确切知道它报告的分辨率之前,我无法做到这一点。:(

最佳回答

据我所知,浏览器假设您将允许它根据需要重新缩放页面,因此无论实际屏幕大小和方向如何,它总是报告相同的宽度。高度的选择大概只是为了使纵横比与实际屏幕比例相匹配。

如果你正在运行FroYo,宽度几乎总是报告为800。我相信,对于Eclair来说,它更像是640,早期版本可能使用了完全不同的方案来报告屏幕大小。(我相信,这些早期版本也支持“@media掌上电脑”,而不是后来的版本,后者认为你的手机屏幕/浏览器比传统的掌上设备更接近桌面。)

问题回答

我注意到一个奇怪的事情,像这样的维度存储在上一个窗口/会话中。当你进入横向/纵向并获得rez时,进行刷新,看看你是否获得了另一个不同的rez。

缩放也是如此。

My advice is do a useragent lookup and make a page specifically for mobile devices. rendering the normal desktop site just wont work.

如果你确实让移动网站看到html元数据“Viewport”,并在你的脑海中放上这样的东西





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签