Questions tagged [android-viewpager]

ViewPager.setcurrentItem( ) freezes ui

The ViewPager is a widget for Android that makes possible displaying different views (or fragments) side by side allowing the user to swipe between them. ViewPager was released as part of the Compatibility Package revision 3 and works with Android 1.6 upwards. ViewPager is a ViewGroup and works in a similar manner to AdapterViews (like ListView and Gallery).

Official Documentation

10802 questions
4
votes
4 answers

how to disable scrolling of HorizontalScrollView inside the ViewPager

I've got a Horizontal Scroll View placed in ViewPager. The goal is to use only software triggered scrolling of Horizontal Scroll View. All the scrolling gestures should be handled by the view pager. I already did it by creating a custom View Pager…
kmalmur
  • 2,809
  • 3
  • 29
  • 37
4
votes
1 answer

FragmentStatePagerAdapter, childFragmentManager and orientation change a bad combination?

Here is my the problem, I have an activity, which includes a Fragment that has a ViewPager using (FragmentStatePagerAdapter), all works perfect when the Activity loads for the first time, but when setting setRetainInstance(true) to the parent…
4
votes
2 answers

ViewPager swipe with 2 fingers

I would to implement a ViewPager swipe with two fingers. I tried to implement a sublcass of ViewPager overriding the onTouchEvent and passing the method to superclass only if the touch is made by 2 fingers. But there is a problem: the swipe…
fran
  • 1,119
  • 1
  • 10
  • 27
4
votes
3 answers

Android PagerTabStrip - Remove spacing

Has anyone managed to bring the items in a V4 PagerTabStrip together, more like Google Play Store? http://developer.android.com/reference/android/support/v4/view/PagerTabStrip.html This is what I want: This is what i get (the space between…
Steven Yates
  • 2,400
  • 3
  • 30
  • 58
4
votes
1 answer

swipe back from a viewpager causes the app to crash

I wrote an app that has an action bar and 3 view pagers, now I finished the first pager, which is a Google map, and for the other 2, I currently just inflate them with a layout that has only a text view. The problem is that whenever I swipe to the…
4
votes
1 answer

ViewPager getScrollX return 0 when fragment resumes/recreates

I am trying to create a Velocity View Pager where in I can scroll through pages like a gallery view. I am experiencing problem while doing scrolling calculations. I am using FragmentStatePagerAdapter for ViewPager. For a normal first time run things…
4
votes
1 answer

Android ViewPager with icons

I'm creating a SlidingPageLayout but it does not have icons. I'm setting a viewPager for this slidingpageLayout. The viewpager has a PagerAdapter and PagerAdapter sets the title of the page. I want to set an icon instead of a text. Reference…
4
votes
0 answers

Prevent ondestroyview to be called for Fragment

I have a scenerio in which I am using Fragment with viewpager. The viewpager is having nested fragments with each fragment having a listview. I am using FragmentStatePagerAdapter and have given setOffscreenPageLimit as the size of arraylist. Now…
Harsh
  • 599
  • 3
  • 20
4
votes
2 answers

Android Return back to same fragment after click on goto first fragment in view pager

I developed one apps in that one i used view pager using fragment.In that i move to one page to another using fragment class.in second fragment class i have one button back on that i write coding to move direct to first fragment through…
user3257401
4
votes
1 answer

Circular ViewPager implementation

Solution-1: By specifying a very large number as the actual count, but maps them to the actual range of the dataset/pageset ViewPager as a circular queue / wrapping Problem: It doesn't work if there are less than 4 items. Solution-2 Adding 2…
Archie.bpgc
  • 23,812
  • 38
  • 150
  • 226
4
votes
3 answers

ViewPager for screen slides from right to left

I am using ViewPager for screen slide it works fine for language's script from left to right but for Arabic script which is actually right to left is not feasible can i swipe pages of viewpager in reverse order?
Hammad Ali Butt
  • 75
  • 4
  • 13
4
votes
3 answers

How to reset the zoomed image into original image

I am using the TouchImageView class available at https://github.com/MikeOrtiz/TouchImageView. when i move from the zoomed image to next and get back to previous image it still have zooming. I want to reset the zooming image into normal position when…
siva
  • 375
  • 6
  • 24
4
votes
0 answers

Create a paged GridView

I need to create a paged GridView where each page contains some elements from a list, like launcher applications do to show the installed apps.The GridView only contains the elements that have enough space on the screen to be shown and the remaining…
Vektor88
  • 4,841
  • 11
  • 59
  • 111
4
votes
1 answer

Swiping Tabs inside a Navigation Drawer Fragment

I have implemented Navigation Drawer by Referring this tutorial and now what I want to do is to display swiping tabs inside a fragment. ie. when i click on an item in navigation drawer, lets say the first one, it should display swiping tabs for that…
user3390703
  • 43
  • 1
  • 4
4
votes
2 answers

Fragment.onCreateView() not called in viewpager after configuration change

After changing orientation, my activity with viewpager , which is list/detail kind, is recreated and crashes if I select an item in a list. I don't want to bother you with all the details (there is a nullpointerexception because a textview…
u2gilles
  • 6,888
  • 7
  • 51
  • 75