0

I have noticed a few applications recently using a kind of tab effect, but it isn't what I would consider a "normal" tab control. The "tabs" are not very tall and only 3 show on the screen at a time. Scrolling the screen left or right reveals another tab, whilst one disappears (hard to describe).

I've seen it on the BBC iPlayer Radio app and on TuneIn app.

The following picture shows what I mean on both of those apps ( though not the sliding bit).

http://i42.tinypic.com/28buosy.png

How do they do that?

kelunik
  • 6,750
  • 2
  • 41
  • 70
Michael Vincent
  • 1,620
  • 1
  • 20
  • 46

2 Answers2

2

This is the ViewPagerIndicator. It is not provided natively, but there is a library: https://github.com/JakeWharton/Android-ViewPagerIndicator

They are used along with the ViewPager: http://developer.android.com/reference/android/support/v4/view/ViewPager.html

Vasily Sochinsky
  • 3,981
  • 2
  • 23
  • 20
1

Another alternative is the Pager Sliding TabStrip:

https://github.com/astuetz/PagerSlidingTabStrip

There is also a sample app on the play store: https://play.google.com/store/apps/details?id=com.astuetz.viewpager.extensions.sample

Jonathon Fry
  • 3,042
  • 3
  • 23
  • 30