i have a tabhost with the layout below.
https://drive.google.com/file/d/0B8nQOFcSOOboNkRFV091VVhzanc/view?usp=sharing (sorry im unable to post photo as im a new user)
I need to have the light blue color border for the selected tab. How i can have my selected tab with the light blue color border?
Please help me, thanks.
first, you need to make a 9 patch PNG with the border line at the bottom. The fastest way I know is through : http://romannurik.github.io/AndroidAssetStudio/nine-patches.html
Then you would make a selector xml on your drawable folder like this one tabs_backgrounds.xml :
For me, I just used simple colors already defined in @color but that doesn't matter, you can use any picture from @drawable, or color from @color. Or in YOUR case, the 9 patch that you should make with the border on the bottom.
Then you need to define a style for tabs on your @style like this :
The on your manifest.xml, you just add this theme for the activity that has the tabs. Something like this :
I find that this is the best way to customize the tabs, you can choose a color or a drawable for each state (focused, clicked ...)
I hope this could help :)