tags:

views:

32

answers:

2

I have a UI that has 6 EditText boxes. 3 of those EditText boxes don't show up when in vertical orientation. I was hoping that wrap_content would wrap the non-showing 3 to the next line but found out that LinearLayout only allows for one row.

When in horizontal orientation I get all 6 of them showing.

I tried a TableView with two rows of 3 each. That looks dorky when in horizontal orientation.

Do I need code to determine when the orientation changes to redraw those EditText boxes so it looks better or is there some layout that will automatically wrap when in vertical orientation?

A: 

You can create a layout with the same name and put it in res/layout-land. It'll use that when in landscape mode.

synic
synic, thanks. I'm trying it but get "Multiple Marker" errors in the generated R.java file. Do I need to rename all of the Spinners, EditText views etc so each file has unique names?
eric
Duh....nevermind. I hate it when I do that!
eric
A: 

u can determine the orientation by this this.getResources().getConfiguration().orientation

Kantesh