3

how to change the tab indicator's images in android? there is a tab_indicator.xml file in-built in android sdk. in that the Relative layout has the background as a tab_indicator file as background. how to customize this images in tab_indicator and set our new images? I have a problem that the not selected tabs are highlighted with a white under line.because of those images. how to customize it?

That RelativeLayout doesn't have the id to access.how can i?Any Idea? Please help.

Note: Reto Meier's answer a year ago says. its not possible at that time. what about now?

Community
  • 1
  • 1
Praveen
  • 90,477
  • 74
  • 177
  • 219

1 Answers1

1

I'm not sure that i 100% understand the problem. If you want custom view as your tab indicator there is API for that http://developer.android.com/reference/android/widget/TabHost.TabSpec.html#setIndicator(android.view.View)

Alex Volovoy
  • 67,778
  • 13
  • 73
  • 54
  • i cant customize the style of the tabs. check the Note in my question please. – Praveen May 11 '10 at 13:44
  • 1
    From 1.6 you can provide a custom view to setIndicator – Alex Volovoy May 11 '10 at 14:26
  • Thanks for reply. May you give sample code snippet for that View. it will be More understandable. :) – Praveen May 11 '10 at 14:44
  • 1
    I will tonight, but basically - define layout, inflate it. Set it as indicator. Look at foursquare project ( it's open source ) - UserDetailsActivity should have an example of what you're looking for. – Alex Volovoy May 11 '10 at 14:58