需要 Android 选项卡布局示例
我正在寻找一个示例,例如标准的“选项卡布局”教程,该教程为每个选项卡使用两个活动,并为每个选项卡使用专用的 xml 布局文件。
任何人都可以帮忙。我发现的所有示例都只是使用以下布局。
TextView textview = new TextView(this);
textview.setText("This is the Artists tab");
setContentView(textview);
使用活动的原因是,对于其中一个选项卡,我想强制横向。
I'm looking for an example, like the standard "Tab Layout" tutorial that uses BOTH activities for each tab and a dedicated xml layout file for each tab.
Can anyone help. All the examples I've found simply use the following for the layout
TextView textview = new TextView(this);
textview.setText("This is the Artists tab");
setContentView(textview);
The reason for using activities is that for one of the tabs I want to force a landscape orientation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这里试试:
http://www.androidpeople.com/android-tabhost-tutorial-第 1 部分
如果您需要任何帮助,请告诉我,因为我的应用程序中有一个完全定制的 TabHost。
谢谢
Try here:
http://www.androidpeople.com/android-tabhost-tutorial-part-1
If you need any help with this let me know because I have a fully customized TabHost in my APP's.
Thanks
选项卡布局教程展示了如何为每个选项卡使用单独的活动内容。只需将其与以下代码片段结合起来即可:
The Tab Layout Tutorial shows how to use separate activities for each tab's content. Just combine it with the following code snippet:
寻找通用TabHost 样式适用于 Android、HTC Sense、Samsung 等皮肤
除了您的 ActivityGroup 中的样式之外:
休息很容易。^^
Looking for a universal TabHost style that will work on Android, HTC Sense, Samsung, etc. skins
In addition to that in your ActivityGroup:
Rest is easy.^^