首页 > 解决方案 > How to create a Layout for Tablet

问题描述

I am making an Android App and have created the basic layout for devices.

But I also want to make the layout for Tablets. I know I can use the different size layouts.

But what should be the ratio of normal layout sizes to the tablet layout size. Any help will be appreciated.

标签: javaandroidxmlandroid-layouttablet

解决方案


您正在寻找的文档在这里。如文档中所述,您应该使用的值是 600dp

res/layout-w600dp/main_activity.xml # 适用于 7 英寸平板电脑或任何 600dp 的屏幕 # 可用宽度(可能是横向手机)

所以基本上你可以在目录中创建一个layout-w600dp文件夹,res用作平板电脑的布局。


推荐阅读