Luis A. Florit
Luis A. Florit

Reputation: 2609

Change layout at autorotation

I want to make a picture gallery with a vertical layout with two parts: image on top, and horizontally scrollable icons below. I know how to do this.

But I also want that, when autorotated, icons stay on the right. That is, I want to change the vertical layout by a horizontal one, and horizontal scrollbar by a vertical one. 

How to do this? Any clues/links would be appreciated.

Thanks!

L.

Upvotes: 1

Views: 156

Answers (2)

Jason Down
Jason Down

Reputation: 22161

You'll want different layouts for each orientation (landscape, portait) and possibly more for different screen sizes. Start with the android documentation.

If you have specific issues, post the issue(s), some code for what you have tried and we'll see if we can help you.

Upvotes: 5

Bob
Bob

Reputation: 23000

you must have multiple layouts. create 2 layouts. one in layout folder for portrait and copy it and paste it in layout-land folder for landscape then customize each other.

Upvotes: 1

Related Questions