android - Android如何选择不同维度的问题
问题描述
我是新的安卓,我有一个问题。我正在开发一个应用程序,我看到了这个问题。我为 Pixel 2 创建布局,而其他设备无法显示为 Pixel 2。当我研究时,我学习创建每个维度的布局。
我在 AndroidManifest.xml 上添加了这个
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:normalScreens="true"
android:anyDensity="true"/>
并创建了不同的布局;例如 login_activity.xml(正常)和 login_activity.xml(大)。但是这个屏幕如何选择设备,是自动的还是其他方式?
解决方案
https://github.com/intuit/sdp使用它来支持多种屏幕尺寸的布局。
推荐阅读
- php - 在选民中获取模拟用户 - Symfony 4
- node.js - 如何在 NodeJS 中自动清理文件
- java - 如何从Java中的可运行线程接收值
- maven - 在 POM 中添加 poiji 依赖项后找不到包(导入 com.poiji.annotation.ExcelCellName)
- java - 我可以在 Java 中将按钮放在绘制的矩形上吗?
- r - R语言在简单图(不是ggplot)的轴上垂直对齐下标和上标?
- logparser - 如何使用 csv 作为 logparser 命令行的输入文件
- r - 两个固定效应变量和一个随机效应?r中的plm
- django - 尝试在 post 方法中保存名为 location 的新字段时出现断言错误
- java - Jackson ObjectMapper 异常:“Person”类型的类型定义无效