Android 操作栏 - 带选项卡
我正在尝试在 android 上创建一个选项卡操作栏,但在遵循教程时我似乎遇到了问题。他们通常会拥有未显示的资源,我也不太确定它们是什么导致我无法像教程中那样编译项目。有人可以帮我解决这个问题吗?谢谢。
I am trying to create a tab action bar on android but I seem to face problems when following tutorials. They usually will have resources which are not shown of which I am also not too sure what are they an causing me not being able to compile the project like in the tutorial. can someone kindly help me out with this. thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是另一个示例项目,在我的一本书中介绍过,它演示了操作栏等功能。
Here is another sample project, covered in one of my books, that demonstrates tabs in the action bar, among other features.
Android 在他们的 APIDemos 中有很多例子;
ActionBarTabs
就是其中之一。Android has many examples in their APIDemos;
ActionBarTabs
is one of them.在 Android Manifest 中将“Theme.Holo”设置为您的应用程序主题非常重要。任何 Holo 主题都可以(Theme.Holo.Light、Theme.Holo.foo.bar)
你的标签必须是这样的
It's important that you set "Theme.Holo" has your application main theme at the Android Manifest. Any Holo theme will do (Theme.Holo.Light, Theme.Holo.foo.bar)
Your tag has to be something like this