强制方向取决于 ViewFlipper 内的视图
我有一个 ViewFlipper,里面有几个 ScrollView。根据子 ScrollView,我需要强制 ViewFlipper 的方向为纵向或横向。我怎样才能做到这一点?谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看http://developer.android.com/guide/practices/screens_support。 html 和 http://developer.android.com/reference/ android/widget/HorizontalScrollView.html
在第一个文档中,请注意,您可以为横向模式和纵向模式提供不同的布局文件。例如,对于横向模式,您可以在 res/layout-land 中有一个布局文件。
如果您需要更多帮助将各个部分组合在一起,请直接询问。
编辑:看来我误读了原来的问题。看看这两篇文章:
强制 Android始终使用横向模式的活动
Android 强制水平(横向)布局< /a>
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:
Force an Android activity to always use landscape mode
Android force Horizontal (landscape) layout