Questions tagged [pagertabstrip]

PagerTabStrip is an interactive indicator of the current, next, and previous pages of a ViewPager.

PagerTabStrip is an interactive indicator of the current, next, and previous pages of a ViewPager in android. It is intended to be used as a child view of a ViewPager widget in the layout.

To use it, we need to add it as a child of a ViewPager in the layout file and set its android:layout_gravity to TOP or BOTTOM to pin it to the top or bottom of the ViewPager. The title from each page is supplied by the method getPageTitle(int) in the adapter supplied to the ViewPager.

For a non-interactive indicator, see .

47 questions
2
votes
1 answer

ViewPager with setPadding() for horizontal Swipe Cards effect - cut off PagerTabStrip titles

I use setPadding() on my ViewPager to achieve a card swipe effect, which is working fine, but as I apply padding to the ViewPager (60, 0, 60, 0) the width of the PagerTabStrip gets obviously smaller and now I get a 60dp gap between the titles and…
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
2
votes
0 answers

How can i scroll my whole view pager and stick to toolBar in Fragment Android?

First of all my English is not too good. But i will try to understand my point to you people. I am making app in which i used scroll view and inside it many other layout with API xml's and also view pager.You can see below
2
votes
1 answer

Custom PagerTabStrip how to disable switching tabs via click - Not Working

I want to disable the "switching tabs by clicking on tab name" of the PagerTabStrip based on a condition. I think the following code is right but I am still able to switch tabs by clicking on the tab names. I was able to disable the switching of…
1
vote
1 answer

PagerTabStrip is clipping off the icon

The design called for just icon on the tab of the PagerTabStrip. Here's the XML:
Johnny Wu
  • 1,297
  • 15
  • 31
1
vote
1 answer

PagerTabStrip missing tab navigation panel

I am now learning to create tabbed activities and I've choosen PagerTabStrip to work with. But now when I'm created fragments, assigned them po Adapter, and assigned adapter to ViewPager, Tab navigation panel of PagerTabStrip is…
1
vote
2 answers

android PagerTabStrip to start from left and not center

i have a pager tab strip in my project and when run on emulator or device it starts center like this what i would like to achieve is to have the tab start left like this I have tried layout graviity left in my xml but this is not working for me…
1
vote
3 answers

Android PagerTabStrip text disappearing

Since a day my PagerTabStrip text is disappearing. The text is only half vissible and disappears when i foccus on my editText? I did not change my xml file, but this is how it looks.
Robin Dijkhof
  • 18,665
  • 11
  • 65
  • 116
1
vote
1 answer

ViewPager only load the fragments once time

I have an android DrawerLayout and it has 2 items, one of them is a fragment with a PagerTabStrip and it load their fragments but when I change the item of the DrawerLayout and I come back to the PagerTabStrip it loads the tabs, but doesn't their…
1
vote
0 answers

Rare crash at pagerTabStrip

I have used pagerTabStrip in my project using
Harry Sharma
  • 2,190
  • 2
  • 15
  • 41
1
vote
0 answers

PagerTabStrip cuts the fragment

I'm trying to implement a viewPager , where I navigate between two fragments on the same activity. And I also added PagerTabStrip. I made just a little sample but for some reason it cuts the fragment.. It also doesn't display buttons defined in the…
BVtp
  • 2,308
  • 2
  • 29
  • 68
1
vote
2 answers

Cannot Set Image and Text in Center Vertical Android PagerTabStrip Android

I got problem when I try to set image and text vertically center. So I'm using SpannableStringBuilder and ImageSpan. I try to combile image and text by this code : @Override public CharSequence getPageTitle(int position) { Locale…
otnieldocs
  • 325
  • 1
  • 5
  • 20
1
vote
2 answers

Can't change PagerTabStrip Selected Text Color

Ok all I'm trying to do is change the Text color of the currently selected PagerTabStrip, I already checked out this answer and it didn't help. What am I doing wrong, and where is .setTextColor()? It should be noted that I'm using…
Petro
  • 3,484
  • 3
  • 32
  • 59
1
vote
1 answer

Navigate inside PagerTabStrip titles without changing the views?

I wanted to navigate between a large amount of views So I implemented ViewPager with PagerTabStrip. Now I want to be able to go from first title to last title without changing the view, if you notice that PlayStore have implemented that. The…
Azad
  • 5,047
  • 20
  • 38
0
votes
1 answer

Why my Fragment class is not showing it`s content when using PagerTabStrip?

I am stucked at one problem regarding my fragments. I just want to switch between different fragments and show a menu on the top - quite standard I think - smth. like here: For this purpose I set up a PageAdapter (where…
Emad Easa
  • 79
  • 1
  • 10
0
votes
1 answer

PagerTabStrip with all captial letters

I have a PagerTabStrip in my app and I put in Strings to the Tab, titles = new String[]{ "Tab1", "Tab2", "Tab3" }; so suppose only "T" here is capital, but I get all capital letters. I also tried to fix this by…
blossomvy
  • 55
  • 10