其他分享
首页 > 其他分享> > 7“hdpi平板电脑Android的文件夹名称

7“hdpi平板电脑Android的文件夹名称

作者:互联网

我有7英寸屏幕(600×1024)的平板电脑,带有hdpi(240 dpi分类).

我创建了文件夹layout-sw600dp.但它不适用于这款平板电脑.

它的工作正常,7英寸屏幕(600×1024),mdpi(160 dpi分类).

我应该为具有hdpi(240 dpi分类)的7“(600×1024)平板电脑创建哪个文件夹?

解决方法:

这取决于您正在构建的Android API版本,如here所述:

… However, this won’t work well on pre-3.2 devices, because they
don’t recognize sw600dp as a size qualifier, so you still have to use
the large qualifier as well. So, you should have a file named
res/layout-large/main.xml which is identical to
res/layout-sw600dp/main.xml. In the next section you’ll see a
technique that allows you to avoid duplicating the layout files this
way.

你也应该看看这里:

Preparing for Handsets

New Tools For Managing Screen Sizes

标签:android,android-resolution
来源: https://codeday.me/bug/20190925/1816718.html