
You'll control the actual TabWidget in your Activity within each button's OnClick. This way, you can more easily customize the buttons to look however you'd like. The idea is to use a hidden TabWidget in your layout and control it with a customized LinearLayout containing Buttons. Rather than trying to customize the widget tabs themselves, here is an alternate approach that I've used successfully on a project that may save you some headaches: Spec = tabHost.newTabSpec("groups").setIndicator("groups", The code I'm currently using to create a new tab is (from the dev guide): intent = new Intent().setClass(this, GroupsActivity.class)
#Tabhost android studio tutorial how to#
I want to be able to change the color of the line that is below the tabs, I could not find any information on how to do this.
#Tabhost android studio tutorial android#
I want to use hex triplets to change the background color of the tabs, to change it between to situations : when this tab is the one selected and when it's not. Welcome to B4X forum B4X is a set of simple and powerful cross platform RAD tools: B4A (free) - Android development B4J (free) - Desktop and Server.

I also want to change the text size (I think it's called the label). Use TabHost’s addTab (TabSpec tabSpec) method to add new tab. Use TabHost’s newTabSpec (String tabName) method to create a new tab.

Use TabActivity’s getTabHost () method to get TabHost object. I want the tab with to act like wrap_content does. Create a layout xml file which includes TabHost xml element. The first problem I have is that the test is in most part over the icon instead of below it (I used an icon with dimensions 48x48 as recommended on the dev guide). I followed the tutorial about Tab Layout on the dev guide and I managed to create tabs with it, but I want to do some customization to it (and I did look on other posts, but either the code had many mistakes to it or it didn't answer what I'm looking for). I opend a post about this before but I feel that I can now (after reading some other posts) better explain what I want and rephrase it so it will be better understand.
