23

When should we use pagerTabStrip and when should we go for pagerTitleStrip???

What does the word interactive indicator and non-interactive indicator mean actually? Can you please explain me the difference and also can you please tell me if there is any difference in the UI?

Ajitha
  • 717
  • 1
  • 7
  • 30

3 Answers3

36

PagerTitleStrip is just a strip which contain title texts; it just indicates the title of the section we're in.

PagerTabStrip is very similar to PagerTitleStrip but actually looks like a strip of tabs (it's used in the Play store tabs, and looks better in my opinion).

You can use PagerTabStrip if you are looking for a tab-like interface. If you are looking to customize PagerTitleStrip, you may want to see ViewPagerIndicator.

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
Binoy Babu
  • 16,699
  • 17
  • 91
  • 134
  • 2
    `ViewPagerIndicator` (unlike `PagerTitleStrip` and `PagerTabStrip`) allows the user to scroll the page titles/tabs independent of the page shown in the `ViewPager`. Very handy. – Adil Hussain Apr 30 '13 at 14:48
  • 2
    ADT generates PagerTitleStrip (using "new Activity" wizard) instead PagerTabStrip. I reckon this is a source of confusion about this question... – caligari Dec 05 '13 at 08:55
  • Any idea how to make it using tabs style, but also that they won't be far from one another? I'm trying to solve it here: http://stackoverflow.com/q/27621425/878126 , to make it look like the pager of the Lollipop contacts app – android developer Dec 24 '14 at 15:41
5

@Binoy Babu answer added every details about PaterTitleStrip and PagerTabStrip. I think to add image for example.

Reference link : http://blog.csdn.net/harvic880925/article/details/38521865

enter image description here enter image description here

Above are PagerTitleStrip example, in which only title will scroll with page scrolling. This do not indicate which page you are currently displaying

enter image description here enter image description here

Above is example of PagerTabStrip which is same to PagerTitleStrip except it indicates which page is displaying now. The current visible tab title is underlined

Thank you

Kushal
  • 8,100
  • 9
  • 63
  • 82
4

Its a old post, but I want to point some differences between PagerTabStrip & PagerTitleStrip.

  1. PagerTabStrip is interactive, means you can click on the tabs to switch between screens, which you cannot do that with PagerTitleStrip.

  2. PagerTabStrip not only indicates the section name, but also has the tab indicator (bottom border) that depicts the active tab. On the contrary, PagerTitleStrip only indicates the section we're in through the title names, but there is no tab indicator.

  3. Going through the docs, you will notice there are more public methods for PagerTabStrip compared to PagerTitleStrip. Example: setTabIndicatorColor() to set the tab indicator programmatically.

  4. Also as mentioned by @BinoyBabu, plugin ViewPagerIndicator allows to customize your pager strip in so many ways.

Akash Patra
  • 768
  • 1
  • 9
  • 20