Android - Handle Screen Orientation

[亡魂溺海] 提交于 2019-12-06 06:17:17

Why not try creating two layouts, one in layout-land and one in layout-port. These will automatically be applied when the device orientation changes.

Inside each of these, create two distinct child layouts one for a portrait view, and one for a landscape view and change the visibility of these to reflect the user's preference.

So, you don't need to handle the rotation change at all, let Android manage that for you, and you just manage the user override.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!