强制方向取决于 ViewFlipper 内的视图

发布于 2024-10-30 11:34:49 字数 98 浏览 6 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亽野灬性zι浪 2024-11-06 11:34:49

查看http://developer.android.com/guide/practices/screens_support。 htmlhttp://developer.android.com/reference/ android/widget/Horizo​​ntalScrollView.html

在第一个文档中,请注意,您可以为横向模式和纵向模式提供不同的布局文件。例如,对于横向模式,您可以在 res/layout-land 中有一个布局文件。

如果您需要更多帮助将各个部分组合在一起,请直接询问。


编辑:看来我误读了原来的问题。看看这两篇文章:

  1. 强制 Android始终使用横向模式的活动

  2. 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:

  1. Force an Android activity to always use landscape mode

  2. Android force Horizontal (landscape) layout

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文