简体   繁体   中英

Two different Layouts(for vertical and horizontal)?

how can i integrate 2 different layouts for my app.

One for a vertical view and one for a horizontal view?

exp.: vertical - Linear Layout horizontal - Table Row

greetings and thx in advance!!!

You could use an orientation listener if you want to do it programmatically:

http://developer.android.com/reference/android/view/OrientationListener.html

Between 0 and 45 degrees, portrait, 45 and 90 landscape, using setContentView().

Or

http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources for the xml (and probably right) way to do it.

Best regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM