3

是否可以使用 adb shell 偏移整个显示内容/更改其位置?

正如我最近注意到的,可以更改分辨率。

adb shell wm size <Res>.

所以,我想知道是否可以引入偏移或更改显示位置。

4

1 回答 1

2

下面是 wm 命令的用法:

usage: wm [subcommand] [options]
       wm size [reset|WxH|WdpxHdp]
       wm density [reset|DENSITY]
       wm overscan [reset|LEFT,TOP,RIGHT,BOTTOM]
       wm scaling [off|auto]
       wm screen-capture [userId] [true|false]

wm size: return or override display size.
         width and height in pixels unless suffixed with 'dp'.

wm density: override display density.

wm overscan: set overscan area for display.

wm scaling: set display scaling mode.

wm screen-capture: enable/disable screen capture.

wm dismiss-keyguard: dismiss the keyguard, prompting the user for auth if necessary.

因此,您要查找的命令是wm overscan偏移显示:

adb shell wm overscan a,b,c,d

安卓 4.3 之前:

adb shell am display-size

参考: https: //plus.google.com/+AdamWPowell/posts/cz5TxuoNDfGhttps://plus.google.com/+AndroidDevelopers/posts/QhWQArNDfS3

于 2015-11-29T12:32:10.617 回答