如何在Android Studio中添加res/values-sw600dp文件?

3
我有一个activity_main.xml文件,适用于不同尺寸的屏幕。
activity_main.xml(land)  --> it auto generate the file layout-land
activity_main.xml(sw600dp) ---> it auto generate the file layout-sw600dp

BUT, it did not auto-generate the values-/res/values-sw600dp and /res/values-land
how to get this two file? 

你可以查看这个链接:https://dev59.com/h1wY5IYBdhLWcg3wYW5X#32685049 - undefined
2个回答

1
  • 右键单击图像中显示的预览方向 [图标类似于电话旋转]
  • 选择创建平板电脑版本
  • 点击查看图片

0
  • 在res文件夹中右键点击
  • 新建
  • Android资源文件
  • 从资源类型中将"value"更改为"layout"
  • 并从可用的限定符中点击"size"
  • 然后选择你想要的

当我添加 <?xml version="1.0" encoding="utf-8"?> <resources> <string name="screen_type">phone</string> </resources> 时,它显示错误。 - undefined
不需要添加screen_type。只需按照我的答案进行操作,就可以了。只要确保每个屏幕尺寸布局都使用相同的名称即可。 - undefined

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接