Openharmony3.2 屏幕旋转和密度配置

请先 登录 后评论

1 个回答

Luffy

1、屏幕旋转

修改foundation/window/window_manager/resources/config/rk3568/display_manager_config.xml

<!-- Indicates orientation of the built-in screen -->
<!-- 0: Orientation::UNSPECIFIED -->
<!-- 1: Orientation::VERTICAL 2: Orientation::HORIZONTAL-->
<!-- 3: Orientation::REVERSE_VERTICAL 4: Orientation::REVERSE_HORIZONTAL -->
<buildInDefaultOrientation>2</buildInDefaultOrientation>
3.2 release版本旋转后开机后会多次旋转,直接修改foundation/window/window_manager/dmserver/src/abstract_screen_controller.cpp
rotationAfter = Rotation::ROTATION_90;

2、屏幕密度

修改foundation/window/window_manager/resources/config/rk3568/display_manager_config.xml

<!--Window display dpi, valid range is 80~640, use 0 if no configuration is requeired-->
<dpi>240</dpi>



请先 登录 后评论
  • 1 关注
  • 1 收藏,802 浏览
  • Luffy 提出于 2023-08-31 10:56

相似问题