开发者

Force orientation depending on the View inside ViewFlipper

开发者 https://www.devze.com 2023-02-22 16:57 出处:网络
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 ?

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消