Tab Layout Won't Show Tab Icons
So I finally made a tab layout for my app that works flawlessly, but there's something missing. I also put a lot of effort in designing icons but I noticed that they're not showing
Solution 1:
This is one nice trick that I used.
Unfortunately since TabHost is depreciated, it somehow only show text in the screen on higher level Api. Some workaround is to do this:
//CRAFTING TABTabSpeccraftTabSpec= tabHost.newTabSpec("Crafting");
craftTabSpec.setIndicator("",getResources().getDrawable(R.drawable.crafticonstate));
IntentcraftIntent=newIntent(this, Bifrost.class);
craftTabSpec.setContent(craftIntent);
Deleting the indicator(text), force the tab to load the images. if you still want the text. you can modify your image to include the text.
Hope that helps
Post a Comment for "Tab Layout Won't Show Tab Icons"