Android Studio 不支持。我想创建新手机的布局,例如 Galaxy S4。我有一个要测试,尺寸太小。但是 android studio 编译器给出了一个错误,因为出现了正斜杠。我尝试了layout-xxlarge,它也给出了错误。
android-apt-compiler: [xxxxxxxxxx] invalid resource directory name:
C:\Users\xxxxxxxxxxxxxx\Dropbox\android_studio_workspace\xxxxxxxxxxxxxxxxx\res/layout-xxlarge
Eclipse 支持这些布局吗?
最佳答案
如您所见here ,“声明 Android 3.2 的平板电脑布局”部分:
For the first generation of tablets running Android 3.0, the proper way to declare tablet layouts was to put them in a directory with the xlarge configuration qualifier (for example, res/layout-xlarge/). In order to accommodate other types of tablets and screen sizes—in particular, 7" tablets—Android 3.2 introduces a new way to specify resources for more discrete screen sizes. The new technique is based on the amount of space your layout needs (such as 600dp of width), rather than trying to make your layout fit the generalized size groups (such as large or xlarge).
你能得到的最好的是:
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
定义了您需要的 here .
关于android - Android Studio 不支持layout-xxhdpi/layout-xxlarge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17423625/