Android 如何通过一个设备开发多种分辨率屏幕UI

获取当前屏幕密度

adb shell wm density

获取当前分辨率

adb shell wm size

重置设备密度和分辨率

adb shell wm size reset

adb shell wm density reset

屏幕1

adb shell wm size 3082x934

adb shell wm density 160

屏幕2

adb shell wm size 3950x1320

adb shell wm density 280

屏幕3

adb shell wm size 2000x974

adb shell wm density 200

通过adb实时修改屏幕分辨率和密度值来,这样一个设备就能同时查看多个分辨率适配的UI

修改完后直接按照对应的apk查看效果即可

相关推荐
牛哇网络工作室4 小时前
UnityHDRP写实数字人全流程基础5—语音输入和语音识别
android·unity·c#·游戏引擎·aigc·语音识别·xcode
一笑的小酒馆5 小时前
Androidiot蓝牙配网简单封装
android
愚公搬代码8 小时前
【愚公系列】《Android应用案例开发大全》016-LBS类应用掌上杭州(辅助工具类的开发)
android·前端
g10565591399 小时前
LAMP博客平台Wordpress实战
android·mysql·nginx·php
hunterandroid10 小时前
[Android 从零到一] Compose LazyColumn 性能优化:key、稳定性与重组治理
android·前端
pengyu10 小时前
【Kotlin 协程修仙录 · 元婴境 · 中阶】 | 操作符真解:Flow 中间操作符与数据流变幻术
android·kotlin
pengyu11 小时前
【Kotlin 协程修仙录 · 元婴境 · 初阶】 | 冷流初啼:Flow 的基础与响应式编程的入门
android·kotlin
wawo0011 小时前
Kuikly实践-从Android compose迁移到kuikly compose
android
Carson带你学Android13 小时前
Android 版 MCP 正式登场:AppFunctions
android·ai编程·jetbrains
古法安卓16 小时前
Android-Direct Boot 阶段与 getFilesDir() 路径变更问题深度分析
android·java·android studio