sw320dp布局块XLARGE布局 [英] sw320dp layout blocks xlarge layout

查看:165
本文介绍了sw320dp布局块XLARGE布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的S3(所有布局的反叛)额外的布局和民说,使用布局sw320dp是良好的S3。一切工作,S3的选择了这个文件夹,并在布局上S3看起来不错。

I made an extra layout for the S3 (rebel of all layouts) and people said, using a layout-sw320dp is good for the s3. Everything worked, the s3 chose this folder and the layout looks great on the s3.

但是,当我尝试在10平板电脑上运行我的应用程序,平板电脑会使用像这是完全错误的。在S3相同的文件夹

But when I try to run my app on a 10" tablet, the tablet uses the same folder like the s3 which is totally wrong.

我怎样才能让sw320dp布局可见只对S3或至少我怎么能做出10平板电脑使用xhdpi文件夹?我已经阅读,android系统认为,由于sw360是一个新式的,这是最好的。但我不知道我怎样才能避免这种情况。

How can I make the sw320dp layout visible only to the s3 or at least how can I make 10" tablets use the xhdpi folders? I already read, that the android system thinks, because sw360 is a "new" type, it's the best. But I don't know how I can avoid that..

感谢

推荐答案

这是因为的precedence高阶开关< ???> DP 预选赛Android系统。 RES-SW< ???> DP 得到了预选赛中的顺序第二高precedence。

This is because of higher order of precedence of sw<???>dp qualifier in Android. res-sw<???>dp has got the 2nd highest precedence in the order of qualifiers.

请参阅配置表预选赛。这是在其中发生的Andr​​oid中的目录资源文件夹的默认顺序。所以基本上你提供力所能及的文件夹具有较低precedence,Android的wolud没有采取。见<一href=\"http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources\"相对=nofollow> Android如何寻找最佳匹配的资源。

See Configuration qualifier Table. This is the default order in which Android takes the directories in resource folders. So basically whatever folder you provide which have lower precedence, Android wolud not take that. See How Android Finds the Best-matching Resource.

下面 sw320dp 意味着最短宽度的至少320dp设备。双方S3和10平板电脑受到这一点。因此Android始终把该文件夹为具有320dp最短宽度的设备。

Here sw320dp means devices with at least 320dp of shortest width. Both S3 and 10" tablets come under that. So Android always take that folder for devices which have shortest width of 320dp.

这些都是一些替代品,你可以做:

These are some alternatives you can do:


  • 请像绘制-720dp (10)和绘制-600dp的(7)的布局
    片。与为有问题的开关&LT; ???&GT; DP 是,这只是在仅13 API被引入。因此,与API&LT片; 13.不能使用。

  • 更改布局高密度手机低到布局
    precedence值。

    • 我基本上都支持这种方法。这种方式可以给予更多的支持
      降低API的设备。

    • Make layouts like drawable-720dp(10") and drawable-600dp(7") for tablets. The problem with giving sw<???>dp is that it's been introduced only in API 13 only. So tablets with API < 13. can't use that.
    • Change the layout for high density phones to layouts with lower precedence values.
      • I basically support this method. This way you can give more support to lower API devices.

      这篇关于sw320dp布局块XLARGE布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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