Android - 将选项卡锁定为纵向
我正在编写一个带有三个选项卡的 Android 应用程序,其中两个以纵向模式设计,一个(迷你电子表格)以横向模式设计。问题在于选项卡集的功能。当我在横向选项卡中设置方向时,选项卡本身会移动并占据屏幕顶部。这占用了大部分屏幕空间,并且使用户感到困惑。
这是我的问题:如何将选项卡本身锁定到位,以便它们在横向模式下保持在相同位置;在横向模式下,这将是屏幕的左侧。
解决这个问题的另一种方法是:是否有一种方法可以旋转选项卡内部的布局而不影响整个选项卡集?
I am writing an Android app with three tabs, two designed in portrait mode, and one (a mini-spreadsheet) in landscape mode. The issue is with the function of the tab-set. When I set the orientation in the landscape tab, the tabs themselves move over and take up the top of the screen. This takes up a large portion of the screen space, and is confusing to the user.
Here is my questions: How do I lock the tabs themselves in place, so they stay in the same position when in landscape mode; in landscape mode this would be the left side of the screen.
Another way of approaching the question: Is there a way to rotate a layout inside of a tab without effecting the entire tab-set?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在选项卡活动下的清单中,放置 android:screenOrientation="portrait"
in the manifest under the tab activity, put android:screenOrientation="portrait"
我在选项卡集之外找到了解决方案。以下链接讨论了显示垂直文本的多种解决方案:
垂直(旋转) Android 中的标签
我选择了 PocketMagic 的“CustomTextView”,可以在这里找到:http://www.pocketmagic.net/?p=1625
通过显示垂直文本的功能,我可以将整个选项卡集锁定在纵向模式下。
谢谢大家的建议。
-cc
I found a solution outside of the tab-set. The following link discusses multiple solutions for displaying Vertical text:
Vertical (rotated) label in Android
I went with "CustomTextView" by PocketMagic which can be found here: http://www.pocketmagic.net/?p=1625
With the ability to display vertical text, I can keep the entire tab-set locked in Portrait mode.
Thanks for the suggestions everyone.
-cc