Questions tagged [pagertitlestrip]

PagerTitleStrip is a non-interactive indicator of the current, next, and previous pages of a ViewPager.

PagerTitleStrip is a non-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.

22 questions
17
votes
5 answers

How to mimic the listView stickey-items like on Lollipop's contacts app?

Background Google has recently published a new version of Android, which has a contact app that look like this : The problem I need to mimic this kind of list, but I can't find out how to do it well. This consists of 3 main components: the stickey…
12
votes
2 answers

PagerTitleStrip do not show titles on first display page, the titles are only drawn after swiping to another page

Issue: After updating to appcompat-v7:23.0.0, both PagerTabStrip and PagerTitleStrip do not show titles on first display page (fig1), the titles are only drawn after swiping to another page (fig2). Library used : appcompat-v7 Version used:…
6
votes
2 answers

How to use PagerTitleStrip in ViewPager2?

I have a standard implementation of PagerTitleStrip in ViewPager but it cannot work in ViewPager2. If I want to migrate to ViewPager2, how should I implement PagerTitleStrip within ViewPager2? I found solution and many detailed info regarding how to…
Neoh
  • 15,906
  • 14
  • 66
  • 78
4
votes
0 answers

How to customize PagerTitleStrip android

I must customize a PagerTitleStrip in ViewPager in this way: I have to create circles with numbers corresponding to the inside pages, the circle in the middle has to be bigger. Anyone have any suggestions?
Ortensia C.
  • 4,666
  • 11
  • 43
  • 70
4
votes
0 answers

How to make ViewPager Title Strip Transparent or Semi Transluscent

The image below is what the PagerTitleStrip looks like when alpha value is set to 0.5: I expect the title strip to be semi opaque. Instead, as you can see, the title strip is not transparent at all. Even if I set alpha value to 0, the title strip…
Neoh
  • 15,906
  • 14
  • 66
  • 78
3
votes
1 answer

Toolbar hides PagerTitleStrip and part of RecyclerView

Screenshot 1 and Screenshot 2 of my app The problem is basically this: The PagerTitleStrip and the RecyclerView go below my Toolbar even though I have set layout_behaviour to my ViewPager. More detail: I have a main activity that uses the layout…
iBobb
  • 1,140
  • 1
  • 14
  • 35
3
votes
1 answer

The Titles do not appear in PagerTitleStrip at all on sdk 23 or 22

i have tried several things to display the text in the tabs on "scroll tabs" in my activity but it never shows any ideas what happened? below is the…
3
votes
2 answers

Cannot remove PagerTabStrip tab indicator line - Android

I would like to remove the PagerTabStrip tab indicator, but I can't find a way. I was trying to set setDrawFullUnderline(false) but it is still there. If I set its color to transparent, I get a black line :-/ How could I get rid of it?…
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
1
vote
0 answers

FragmentStatePagerAdapter getItem not working

I have a viewpager with PagerTitleStrip.I adaptered my FragmentStatePagerAdapter successfully. This is a my source: public class CardsDetailsNewFragment extends MainFragment { private Card mCurrentCard; private View mView; private…
0
votes
0 answers

How to change text title in viewpager to image

I have a viewpager tab in my app that uses text to display the title. I initially followed a tutorial to make it text, but now I want it to be icons. I've already seen answers to this question, but I'm struggling to implement them into my code. This…
0
votes
1 answer

Add a button to PagerTitleStrip

I have an application that features video and text content in a View Pager (the only functionality is to swipe left and right to change screens with content). Now I need to add an "About" screen to the application. To be able to do that I'd need to…
Sasha Shpota
  • 9,436
  • 14
  • 75
  • 148
0
votes
1 answer

ViewPager with fragments: crash after orientation change (incorrect fragment displayed)

I have a ViewPager with a PagerTitleStrip which paints fragments. Each fragment has a StableArrayAdapter which fill the fragment with information. After an orientation change, when I click on the fragments, I'm getting a crash: …
0
votes
1 answer

How to set text style in pager title strip

I am trying to set the style and size of my pager title strip .But I am able to set only the text color and size but I am not able to set the style how to set different style in the pager title strip. here is what i tried Style
SAVVY
  • 842
  • 16
  • 33
0
votes
0 answers

PagerTabSlider: content of slider shows after sliding and pageTitleStrip never shows the text just blue line

I was following this link for creating viewPager with Pager title strip but on running app it never shows the content in tab, on changing to pager tab strip it is showing the content but only after sliding. What I am doing wrong? Here is…
0
votes
1 answer

Distribute titles evenly with PagerTitleStrip

This is the XML for my PagerTitleStrip:
Martin Erlic
  • 5,467
  • 22
  • 81
  • 153
1
2