0

i am trying to implement a view pager with indicator like in the image bellow. The problem is that i can't manage to style the indicator in order to look like that. enter image description here

Could someone tell me how can i obtain that indicator because using the normal one will give me something like enter image description here

I have tried to change the style but will only change to the size of the tab, not smaller than that.

Thank you.

bogdand
  • 76
  • 1
  • 10

1 Answers1

1

i recommend to you to see this tutorial about sliding tabs.

if this not what u looking for u can create your own tabs layout and implement OnPageChangeListener, when the method "onPageSelected" invoked u can change the visibility of the indicator in your custom tab layout.

Liran Peretz
  • 580
  • 8
  • 11
  • Hi @Liran. Thank you for your support. Right now the tutorial provides only a part of the solution, the sliding one. The other problem is how can i make de design of the underlying to be slimmer. i've tried to generate a custom tab but they have the same height. Is there a way to make it slimmer or only if i make my custom underlying bar?? – bogdand Nov 11 '14 at 16:39
  • look this solution: http://stackoverflow.com/a/15261139/1928342 it's seems like u can to set your own background for the tab, attention to the selector, when the view in state 'android:state_selected="true"' you should set 'android:drawable="@drawable/your_custom_drawable_with_padding_underline" – Liran Peretz Nov 12 '14 at 18:35