对于谷歌的Nexus 7和10个布局文件夹文件夹、布局、Nexus

由网友(诺贝尔可爱奖得主)分享简介:我正在开发的谷歌Nexus 7和10的应用程序,但有一个问题。我不知道哪个布局文件夹应被用于图7和10。I am developing an application for google nexus 7 and 10. But there is a problem. I don't know which layout...

我正在开发的谷歌Nexus 7和10的应用程序,但有一个问题。我不知道哪个布局文件夹应被用于图7和10。

I am developing an application for google nexus 7 and 10. But there is a problem. I don't know which layout folder should be used for 7 and 10.

推荐答案

有关承上启下7

layout-large-hdpi

有关关系10

layout-xlarge-xhdpi

注意:这个应用程序获取图像,从这些文件夹只有当你没有给更高的precedence预选赛。例如,如果你给了像布局文件夹布局sw360dp 应用程序会从这个文件夹,即使你已经给不同的布局像我上面说的只是图像。由于Android的存在是precedence中,你必须给布局的订单。

Note: The app takes images from these folders only if you have not given higher precedence qualifiers. For example if you have given a layout folder like layout-sw360dp the app will take only the images from this folder even if you have given separate layouts like the one I said above. Because in android there is an order of precedence in which you have to give layouts.

勾选此official文档为预选赛precedence的顺序。

Check this official doc for the order of precedence of qualifiers.

编辑: 提供了布局片是Android的一个非常困惑的事情。我有一个可怕的时间,提供布局片。不过,我这么多的尝试后,终于成功了。说了这么一件事你必须要记住的是,即使你没有给正确的文件夹,Android将采取下一步适当的布局文件夹相对于该设备。

Providing layouts for Tablets is a very confusing thing in Android. I had a horrible time in providing layouts for tablets. However I finally succeeded after so many attempts. Having said that one thing you have to remember is that, even if you have not given the right folder, Android will take the next suitable layout folder with respect to the device.

现在关于你的评论,三星7,我认为理想的布局将

Now regarding your comment, for samsung 7, I think the ideal layout will be

layout-large-mdpi.

和为三星7.7,它可能是

And for samsung 7.7, it may be

layout-large-hdpi (which I haven't tried yet)

和三星10.1,这将是

And for Samsung 10.1, it will be

layout-xlarge-mdpi

关于你的Nexus 10,你必须做出不同的图像,以适应其规模。

Regarding your Nexus 10, you have to make separate images to fit to its size.

阅读全文

相关推荐

最新文章