在Android上的标签写的文字 [英] writing text in tabs on android

查看:227
本文介绍了在Android上的标签写的文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写在我的Andr​​oid上标签的身体一些文字,这是下面的code,我有。

I am trying to write some text in the body of my tabs on android this is the following code that I have.

intent = new Intent().setClass(this, Tab1.class);
spec = tabHost.newTabSpec("songs").setIndicator("Information",
                   res.getDrawable(R.drawable.ic_tab_artists))
                  .setContent(R.id.tab1Layout);
tabHost.addTab(spec);

谁能告诉我怎么做才能为我做一些文本添加到标签的身体?

Can someone tell me what to do in order for me to add some text to the body of the tab?

推荐答案

这里是你在找什么一个pretty很好的例子。

您基本上只需要创建一个包含内容的标签类,然后添加到您的tabhost与 tabHost.addTab(yourTab);

You basically just need to create a class that contains your contents for the tab and then add that to your tabhost with tabHost.addTab(yourTab);

这篇关于在Android上的标签写的文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆