开发者

Android Tabs: don't display the text underneath

Maybe I'm not reading it carefully enough, but the Tab Layout tutor开发者_StackOverflowial doesn't specify how to display a tab without the icon or without the text underneath. Are either of these possible? If so, how do I do it?


Have you tried this?

For tab without icon

spec = tabHost.newTabSpec("artists").setIndicator("Artists",null)
                  .setContent(intent);

For tab without text

spec = tabHost.newTabSpec("artists").setIndicator("",
                      res.getDrawable(R.drawable.ic_tab_artists))
                  .setContent(intent);

Of course, these are just lee way of doing them. For more complicated view on tabs, you may want to have a customized view and use setIndicator (View view) method to get your desired look.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜