java - 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.
解决方案
您正在寻找的文档在这里。如文档中所述,您应该使用的值是 600dp
res/layout-w600dp/main_activity.xml # 适用于 7 英寸平板电脑或任何 600dp 的屏幕 # 可用宽度(可能是横向手机)
所以基本上你可以在目录中创建一个layout-w600dp
文件夹,res
用作平板电脑的布局。
推荐阅读
- python - 具体张量分解
- python - Pandas 按年和月汇总并汇总其他列
- python - PyCharm 为路由和模型提供未使用的导入错误
- python - 从网站结果中抓取表格为空
- c++ - 根据用户输入对齐一行文本 (C++)
- reactjs - ionic 5 + React App 很慢,SideNav 在生产版本构建 android 中滞后
- python - Django 使用需要模型名称的函数覆盖 ModelAdmin 类
- sas - 理赔数据分析:根据给定标准选择参与者
- c# - Unity项目文件问题
- docker - 如何在一个 docker 容器中从另一个容器启动计算并获取计算结果