I'm using Theme.Holo as my parent theme for an application. However, the tabs in the tab host don't display icons. In order to display icons, I can change the theme to Theme.Light or just Theme, but then I won't have the action bar that comes with Theme.Holo.
Could someone please tell me how I could display icons on the tab host when using Theme.Holo? I'm referring to the iOS-like tab bar icons.
Dont know if this solves your problem, but if you remove the text, the icon will be displayed.
This is the code I use:
TabHost tabHost = getTabHost();
Intent intent = new Intent().setClass(this, Overview.class);
spec = tabHost.newTabSpec("overview")
.setIndicator(Build.VERSION.SDK_INT < 11 ? this.getString(R.string.descr) : "", res.getDrawable(R.drawable.tab_overview))
.setContent(intent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With