在竖屏时,我们的界面是这样的:

如果开启自动旋转,在横屏时,虚拟按键仍然在该位置,显示为屏幕的右侧,现在需求是让横屏时虚拟导航栏跟随调整到屏幕下方,即下图所示:

这时,我们就需要做以下修改
<!-- frameworks\base\core\res\res\values\config.xml -->
<!-- Controls whether the nav bar can move from the bottom to the side in landscape.
Only applies if the device display is not square. -->
<bool name="config_navBarCanMove"<

本文介绍如何在Android R系统中,当设备横屏时将虚拟导航栏调整到屏幕底部。通过设置特定参数,可以实现横屏状态下虚拟按键始终保持在屏幕下方。
最低0.47元/天 解锁文章
623

被折叠的 条评论
为什么被折叠?



