0

I have a ViewFlipper with several ScrollViews inside. Depending on the child ScrollView I need to force the ViewFlipper's orientation to portrait or landscape. How can I achieve this ? Thanks.

xain
  • 13,159
  • 17
  • 75
  • 119
  • i m not sure but i think that at runtime you can't change the orientation through code,it is done by device sensor at runtime – Ayudh Apr 06 '11 at 12:16

1 Answers1

0

Take a look at http://developer.android.com/guide/practices/screens_support.html and http://developer.android.com/reference/android/widget/HorizontalScrollView.html

In the first document, note that you can provide different layout files for landscape versus portrait modes. For example, for landscape mode, you could have a layout file in res/layout-land.

If you want more help putting the pieces together, just ask.


Edit: It looks like I misread the original question. Take a look at these two posts:

  1. Force an Android activity to always use landscape mode

  2. Android force Horizontal (landscape) layout

Community
  • 1
  • 1
Thane Anthem
  • 4,093
  • 4
  • 26
  • 24