适用于不同屏幕分辨率但平板电脑尺寸相同的Android布局 [英] Android layout for different screen resolution but tablet of same dimension

查看:153
本文介绍了适用于不同屏幕分辨率但平板电脑尺寸相同的Android布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一款适用于10英寸平板电脑的应用程序. 我已经在三种不同的平板电脑上进行了设计测试:

I have developed an App intended to work on 10" tablets. I have made my design tests on three different tablets:

三星Galaxy Tab 2(1280 * 800) Arnova 10g2(1024 * 600) Arnova 10bg3(1024 * 600)

Samsung Galaxy Tab 2 (1280*800) Arnova 10g2 (1024*600) Arnova 10bg3 (1024*600)

我在layout-large和layout-xlarge之间做了区分

I have made a distinction between layout-large and layout-xlarge

我的问题是 Galaxy选项卡使用xlarge中定义的布局 Arnova 10 g2使用xlarge中定义的布局 Arnova 10 bg3使用大尺寸定义的布局

My problem is that Galaxy tab uses the layout defined in xlarge Arnova 10 g2 uses the layout defined in xlarge Arnova 10 bg3 uses the layout defined in large

由于屏幕分辨率不同,我知道Arnova 10bg3和三星没有使用相同的布局类别.

As the screen resolutions are different I understand that The Arnova 10bg3 and the Samsung are not using the same layout category.

但是我不明白为什么Arnova 10g2使用xlarge布局,同时具有与其他Arnova相同的屏幕定义.

But I don't understand why the Arnova 10g2 uses the xlarge layout while it has the same screen definition as the other Arnova.

这导致我遇到一个问题,即1280 * 800的设计不能很好地应用于Arnova.我能做些什么?

This leads me to the problem that the design for 1280 * 800 is not well applied on the Arnova. What can I do?

推荐答案

有两个600 * 1024分辨率屏幕.

因此,当您要区分布局时,必须在布局目录创建中使用以下方法.

So when you want to differentiate your layouts, you must use following method in layout directory creation.

1)低密度,超大屏幕 layout-xlarge-ldpi
2)大屏幕中等密度 layout-large-mdpi

1) low density with extra large screen layout-xlarge-ldpi
2) medium density with large screen layout-large-mdpi

因此,当您要创建用于特定分辨率的特定布局屏幕时,必须使用layout-<screen-size>-<density>

So, when you want to create specific layout screen for specific resolution, you must go with layout-<screen-size>-<density>

这篇关于适用于不同屏幕分辨率但平板电脑尺寸相同的Android布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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