1

I have a layout in portrait mode with a textview and some buttons that customize the font style of the textview. I would like that by changing the layout orientation to landscape mode, the textview would fill the entire screen.

I definitely do not know how to do it. Alternating two activities? Rotate activity by code and hiding other components (buttons)? What would be the best way?

Example

PiLHA
  • 2,326
  • 1
  • 24
  • 32

1 Answers1

1

If you set an xml file in setContentView, then just make another xml file with the same name and put it in res/layout-land and it will automatically switch.

See the docs for more, or this question.

Community
  • 1
  • 1
SQLiteNoob
  • 2,958
  • 3
  • 29
  • 44