谁能提供 Android 中 TabHost 的示例代码?
我需要示例代码来在 android 中创建 TabHost。 谁能帮我。
I need sample code to create TabHost in android.
can anyone help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我需要示例代码来在 android 中创建 TabHost。 谁能帮我。
I need sample code to create TabHost in android.
can anyone help me.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
Android 开发者网站有一个出色的完整代码示例,用于使用
TabWidget
和TabHost
在 Android 中创建选项卡。查看你好,TabWidget。
The Android Developer site has an excellent fully worked code sample for creating tabs in Android using the
TabWidget
andTabHost
.Check out Hello, TabWidget.
我已经完成了与显示分数相关的 tabhost 代码
我的 xml 包含:
I had done tabhost related code with respect to displaying scores
My xml contains :
Activity_main.xml 包含
java 代码是
activity_main.xml contains
and java code is
资源/布局/activity_main.xml
src/MainActivity.java
您可以按照这些教程获取帮助
使用 TabHost 创建选项卡式 UI
Android 选项卡布局教程
res/layout/activity_main.xml
src/MainActivity.java
You can Follow these tutorials for help
Creating a tabbed UI with TabHost
Android Tab Layout Tutorial