Questions tagged [pagerslidingtabstrip]

Interactive paging indicator widget, compatible with the ViewPager from the Android Support Library.

enter image description here

230 questions
3
votes
1 answer

FragmentPagerAdapter reload the processed fragment on the tabs based on the parameter value

i have created my project using this material design example. i have modified the code and now i have 5 tabs now. And now i have created 5 fragment classes and loading it on the view pager. now what i want is, i want to pass the selected sliding…
3
votes
0 answers

Android SlidingTabLayout - 1st Tab Always selected unless clicked

I've successfully implemented Google's SlidingTabLayout with custom icons. every icon has 2 versions, selected/unselected. When my application starts, the first tab (out of 4) shows a selected state which is fine. Thereafter, if I click on any of…
Vivek Malhotra
  • 751
  • 2
  • 7
  • 17
3
votes
1 answer

ViewPager neither shows ActionBar nor PagerSlidingTabStrip

Below is the code which i have implemented for ViewPager and adding PagerSlidingTabStrip.But my viewpager neither shows ActionBar nor shows PagerSlidingTabStrip.If i try to add actionBar.show() inside onResume() app crashes showing null pointer…
user4738063
3
votes
1 answer

How to add press effect or selector indicator to astuetz/PagerSlidingTabStrip?

I used astuetz library and implemented PagerSlidingTabStrip for my android application, it's working find. Now I want to change pressing effect, I tried: android:background="@drawable/tab_selecor" Code for tab selector:
Caffe Latte
  • 1,693
  • 1
  • 14
  • 32
3
votes
0 answers

Sliding Tab Layout scrolling to previous current location before scrolling

Does anyone realise that there's a glitch on Sliding Tab Layout class that provided by Google? I was customizing to use custom icons inside tabs and I realise that when I slide to the end and scroll the sliding tab layout to the beginning and select…
Barışcan Kayaoğlu
  • 1,294
  • 3
  • 14
  • 35
3
votes
2 answers

Tabs in ViewPager inside vertical ScrollView won't scroll verticaly

I have tabs in ViewPager that inside vertical ScrollView. Horizontal swipes performed successfully. When I try vertical swipes, nothing happens. FragmentActivity layout
ViT-Vetal-
  • 2,431
  • 3
  • 19
  • 35
3
votes
0 answers

Robolectric: StartFragment Fails

Does anyone have a clue why I'd have a problem inflating the view for a fragment? It seems to be related to this custom view but after digging through the custom view it makes no sense why starting the fragment would fail. Looking for someone…
adrian
  • 2,326
  • 2
  • 32
  • 48
3
votes
0 answers

In Viewpager how to validate form on page change and if any empty field stay back on same page?

I used ViewPager using PagerSlidingTabStrip Library and forms on each page.I try to validate forms on SimpleOnPageChangeListener.onPageSelected method and if any field is empty return to same page again.But my following code works properly on swipe…
Ramprasad
  • 7,981
  • 20
  • 74
  • 135
3
votes
3 answers

PagerSlidingTabStrip NullPointerException when setting ViewPager

I'm trying to implement PagerSlidingTabStrip in my app. I did everything I'm supposed to do: Added it to my XML:
Guy
  • 6,414
  • 19
  • 66
  • 136
3
votes
2 answers

How to switch tab to specified position in PagerSlidingTabStrip

I want the app structure like Sliding drawer menu + Tabs like in Google Play store app. I searched and got the one on GitHub the awesome PagerSlidingTabStrip. I have somehow customized this project. Project is working nice. Now it looks like I…
3
votes
4 answers

PagerSlidingTabStrip: ViewPager tabs alignment to right

How to align the tabs in the ViewPager to the right instead of the left? I am using android.support.v4.view.ViewPager if that matters. I've tried android:layout_gravity="right" but it doesn't affect the…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
3
votes
1 answer

Android: Changing fragments with ViewPager

I'm using PagerSlidingTabStrip library for ViewPager https://github.com/astuetz/PagerSlidingTabStrip. I want to change the fragments while scrolling. I achieved that with the below code. MainActivity.java public class MainActivity extends…
2
votes
1 answer

Is there any way to set PagerSlidingTabStrip indicator width

Here i am using Android PagerSlidingTabStrip, and i want to know how to set its indicator width not full of its tab, such as set its indicator width 2/3 as its tab. here is my xml configuration:
Crabime
  • 644
  • 11
  • 27
2
votes
0 answers

Tabstrip like Flipboard app

I'm trying to make a tabstrip, linked to a ViewPager, that has the same look and feel as in the Flipboard app. I tried different libs, and even decompiled their app, but I can't find how they did this. So far, I managed to have a regular Material…
2
votes
1 answer

Elevation on SlidingTabLayout in pre lollipop device

"Elevation" make Sliding Tab Layout worked fine on Lollipop device but tabs will disappeared on pre-lollipop device. I wondering is there any way to add elevation on SlidingTabLayout for pre-Lollipop devices. Here is my .XML file :
1 2
3
15 16