简体   繁体   English

如何分别为Nexus4和Galaxy Nexus布局?

[英]How to make layout for Nexus4 and Galaxy Nexus separately?

I am trying to make my calculator app to be compatible with all types of screens. 我正在尝试使我的计算器应用程序与所有类型的屏幕兼容。 These are my layout folders: 这些是我的布局文件夹:

  • layout-large 布局大
  • layout-normal 布局正常
  • layout-small 布局小
  • layout-sw360dp 布局sw360dp
  • layout-sw360dp-large 布局sw360dp,大
  • layout-sw360dp-xlarge 布局sw360dp,XLARGE
  • layout-xhdpi 布局xhdpi
  • layout-xlarge 布局XLARGE

in this case, Galaxy Nexus and Nexus 4 uses the same layout for some reason: layout-sw360dp, but their layout isn't matching. 在这种情况下,由于某些原因,Galaxy Nexus和Nexus 4使用相同的布局:layout-sw360dp,但是它们的布局不匹配。 If I change it for the Nexus 4, it will screw up the Galaxy Nexus: 如果我为Nexus 4更改了它,它将使Galaxy Nexus损坏: 在此处输入图片说明

For Nexus 4 use: layout-xhdpi folder . 对于Nexus 4,请使用: layout-xhdpi文件夹。

For Galaxy Nexus use: layout-sw360dp folder. 对于Galaxy Nexus,请使用: layout-sw360dp文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM