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.
精彩评论