开发者

android layout-land and screen-rotation handling

开发者 https://www.devze.com 2023-02-04 14:46 出处:网络
I have layouts for portrait mode (in folder layout) and for landscape one (in the folder layout-land). This screen is located under one of the tabs, so I had to handle screen rotating (after screen ha

I have layouts for portrait mode (in folder layout) and for landscape one (in the folder layout-land). This screen is located under one of the tabs, so I had to handle screen rotating (after screen has been rotated, no default screen restart occurs).

I would like to update view from 'layout-land' when screen rot开发者_运维问答ates to landscape mode and from 'layout' when screen rotates to portrait one.

How can I do this?


You can use onConfigchange method in that setContentView(R.layout.name) this way will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消