Android 8.1下nano pc t4板的屏幕方向纵向

use*_*615 2 android android-8.1-oreo

我们遇到运行 Android 8.1 的Nano pc t4板的屏幕方向问题。在横向模式下它可以正常工作,但在纵向模式下它会缩放并显示如下图所示,带有黑色角:

电视照片。 屏幕方向是水平的,但 Android 应用程序垂直显示

目前我们需要将其翻转,如下图所示,没有黑色空格:

方向旋转 90 度的显示器照片。 应用程序显示正常

我们通过多种方式进行了测试:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
Run Code Online (Sandbox Code Playgroud)

以及更多变体。任何人都可以帮助设置正确的配置吗?

Mar*_*ler 5

解锁旋转锁后,输出HDMI可以旋转:

adb shell root
adb shell remount
adb shell setprop persist.demo.hdmirotation portrait
adb shell setprop persist.demo.hdmirotationlock false
adb shell setprop persist.demo.singledisplay true
adb reboot
Run Code Online (Sandbox Code Playgroud)

然后可以设置 wm 的显示几何形状:

adb shell wm size 1080x1920
adb shell wm size 1920x1920
Run Code Online (Sandbox Code Playgroud)

或切换user_rotation:

settings put system user_rotation 1
settings put system user_rotation 3
Run Code Online (Sandbox Code Playgroud)

社区NXP似乎是源头。