replace layout on orientation change

前端 未结 6 1930
天涯浪人
天涯浪人 2020-12-01 13:03

My app has a webview and some buttons inside a LinerLayout.

the problem is, I want the buttons to be on bottom in portrait mode and on left in landscape mode while t

6条回答
  •  死守一世寂寞
    2020-12-01 13:15

    put that at layout-land for the layouts you want as landscape.

    The idea is, you shouldn't really use configChange="orientation" because it has its downsides. You can find a detailed post here . You should manually handle your state if you want to change your layout. Of course you can programmaiclly do this but if you want to use xml to do this. You can maintain you webView with fragments.

提交回复
热议问题