Android: Make landscape without layout?

I just want to group 4 buttons like this ...

Portrait Mode:

[1][2]
[3][4]

Landscape mode:

[1][2][3][4]

I do not want to print my xml file in portrait mode and put it in the "layout-land" folder for this slight difference. Then I have to change two files when implementing new material.

Is this impossible to achieve if it is wise to use it in some LinearLayouts? Something like that? ({} represent LinearLayouts)

{{[1][2]}{[3][4]}}
+3
source share
1 answer

Is it impossible to achieve using the sensible LinearLayouts methods?

. LinearLayout . onConfigurationChanged().

- res/layout res/layout-land, <include>, , .

+4

Source: https://habr.com/ru/post/1764886/


All Articles