davs
davs

Reputation: 9396

android layout-land and screen-rotation handling

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 rotates to landscape mode and from 'layout' when screen rotates to portrait one.

How can I do this?

Upvotes: 5

Views: 5242

Answers (1)

Anand
Anand

Reputation: 1325

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

Upvotes: 6

Related Questions