3

i recently customized the UI of my tabs by setting a backgroundResource on each tab, then switch between selected / unselected depending on which tab is currently in focus. I got one problem though, there seems to be a white border that comes with the tabwidget by default that stretches over to the other (unselected) tabs at the bottom. I wanna change the color or possibly remove it. Is there anyway of doing that ?

//thx in advance for replies

Krewie
  • 115
  • 1
  • 11
  • 1
    Similar question: http://stackoverflow.com/questions/3245382/how-to-get-rid-of-horizontal-scroll-bar-in-tabhost – Dariusz Bacinski Aug 07 '10 at 16:53
  • tried to nest it in a linearLayout as the answer on that link but it didn't solve the problem. – Krewie Aug 07 '10 at 18:15
  • i found that the solution on that link only pushes the bar to the bottom of the activity. – Krewie Aug 07 '10 at 18:31
  • Try also to set this: http://developer.android.com/reference/android/widget/TabWidget.html#attr_android:tabStripEnabled. But I think this is available from API 8. – Dariusz Bacinski Aug 07 '10 at 20:55
  • 1
    When tab bar is at the bottom of the screen, you can try to set android:layout_marginBottom of TabWidget to negative values. – Dariusz Bacinski Aug 07 '10 at 21:02
  • thx i'll try that, yeah i noticed that they added some new layout attributes to the 2.2 api , unfortunetly i'm developing for 2.1 but i'll try the suggested solutions, thx for the replies :) – Krewie Aug 07 '10 at 22:48
  • yeah it worked thank you! :D , i put a negative margin and had to put a padding on top of the main view xml and all the other views that are under the tabs to show the content correctly, thx once again :) – Krewie Aug 07 '10 at 23:40

0 Answers0