如何Android的布局分类中的小,中,大,X大屏幕? [英] How to categorize android layout in to small,medium,large,x-large screen?

查看:128
本文介绍了如何Android的布局分类中的小,中,大,X大屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了4个不同的布局文件,并把它放在布局,布局小,布局大型,布局XLARGE。文件夹, 经过测试,在QVGA,HVGA,和WXGA模拟器。 但它只是采取了默认的布局(我把它放在布局文件夹)的所有仿真器。任何解决方案?

I created 4 different layout files and placed it in layout , layout-small,layout-large,layout-xlarge. folder and TESTED IN QVGA,HVGA,AND WXGA EMULATOR. But it is only taking the default layout(which i placed it in layout folder)for all emulator. Any solution?

推荐答案

你有没有给予相同的名称所有的布局文件,如: main.xml中,我的意思是说把同一个名字到XML布局文件和地方在特定的文件夹中。它将搭载Android本身的自动管理,程序员不必操心一样。

Have you given the same name to all layout file, for e.g. main.xml, i mean to say give the same name to xml layout files and places in the particular folder. It will automatically managed by Android itself, programmer need not to bother about the same.

我做了我的评论的回答,因为这是对按上述vnshetty的评论。使其他的答案可能不被选择为接受的错误。

I made my comment as answer as this is right as per vnshetty's comment above. So that other answers may not be selected as accepted wrongly.

这篇关于如何Android的布局分类中的小,中,大,X大屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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