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查看效果即可

相关推荐
Ya-Jun3 小时前
常用第三方库:flutter_boost混合开发
android·flutter·ios
_一条咸鱼_4 小时前
深度剖析:Android NestedScrollView 惯性滑动原理大揭秘
android·面试·android jetpack
_一条咸鱼_4 小时前
深度揭秘!Android NestedScrollView 绘制原理全解析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android CoordinatorLayout:从源码深度解析其协同工作原理
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android View 的 TranslationY 位移原理:源码深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android NestedScrollView 滑动原理:源码深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
深度揭秘:Android NestedScrollView 拖动原理全解析
android·面试·android jetpack
_小马快跑_4 小时前
重温基础:LayoutInflater.inflate(resource, root, attachToRoot)参数解析
android
_一条咸鱼_4 小时前
揭秘!Android RecyclerView 预取(Prefetch)原理深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android ImageView:从源码深度剖析使用原理
android·面试·android jetpack