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
2 answers

Adding drawable to CirclePageIndicator

How to add image to circle pageindicator instead of adding color.. I have tried to add iconpage indicator but on click method is not working but i can add Image.. In circlepageIndicator onclick method is working but HOW TO ADD DRAWABLE, IMAGE TO…
4
votes
1 answer

ViewPager not showing anything

Please, advice. I can't get ViewPager working. Here is what I'am doing: 1) This is my LinearLayout in which I will put the ViewPager. I'am sure that it's work. I can put any View in it:
Ok-Alex
  • 558
  • 2
  • 13
  • 29
4
votes
1 answer

The ViewPagerIndicator is not smooth with 1000 pages

Now I have a ViewPager and ViewPagerIndicator to paging my screen on Android. I override getCount() from FragmentStatePagerAdapter and return 1000 to have 1000 pages. I need to do some code to get the page title base on calendar (dd/MM/yyyy). Any…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
4
votes
1 answer

Fixed Tabs with android.support.v4.view.PagerTabStrip or ViewPagerIndicator

In my app I have a Sherlock ActionBar with spinner navigation ("ActionBar.NAVIGATION_MODE_LIST"). In one activity I have two fragments which shall be switchable via tabs. What I did now, was to put the fragment loading into a ViewPager…
4
votes
1 answer

Different text for each image in image viewpager

I used viewpager class to display sets of images instead of gallery class as its deprecated and customized it to show the text by using the below code , the problem is the same text showed for all images , what im trying to get is : Different text…
Android Stack
  • 4,314
  • 6
  • 31
  • 49
4
votes
4 answers

Android ViewPager Exception after pressing back button

I have a ViewPager which contains 3 fragments which is working fine. I start an activity from my any of my fragments inside the viewpager and the activity is displayed. After that when i press the back button, my application crashes with the…
kunal khemka
  • 67
  • 2
  • 9
4
votes
1 answer

Calling functions inside fragments in Android

In my android application Iam using viewpager.I have two fragments.Fragment1 and Fragment2.Iam calling two different function on both fragments.ie, 'function1' on Fragment1 and 'function2' on fragment2.When I start the application, both these two…
4
votes
5 answers

Control which directions the ViewPager can be scrolled, dynamically with UI feedback

I'm working on an app which uses many pages to swipe through, however at some pages I would like to be able to prevent scrolling to the next page until they've selected something. At the moment I've extended ViewPager: /* (non-Javadoc) * @see…
Tim Kist
  • 1,164
  • 1
  • 14
  • 38
4
votes
3 answers

Circular ViewPager for continuous scrolling

I am displaying a ViewPager containing only ImageViews. But, I need it to happen continuously in a circular manner. For Ex : ...c > B > A > B > c...
Manjunath
  • 2,063
  • 2
  • 29
  • 60
4
votes
2 answers

Display of Multiple pages in ViewPager, Incorrect Position

I am trying to implement Dave Smith's PagerContainer to show multiple pages in my ViewPager. I have implemented an on-click listener to display the page numbers, but when I click on the left page, "clicked on item 2" message is shown (item 0 would…
burakk
  • 1,231
  • 2
  • 22
  • 45
4
votes
3 answers

how to change the font of a pagertitlestrip

Typeface xyz=Typeface.createFromAsset(view.getContext().getAssets(), "fonts/xyz.ttf"); (TextView)abc.setTypeface(xyz); This is how you create and set a custom typeface. I need to set the typeface/font of a pagertitlestrip but there…
Drilon Berisha
  • 207
  • 1
  • 2
  • 14
4
votes
2 answers

Android ViewPager, switching from fragment to another fragment

I have a viewpager with 2 pages, on each fragment i put a button to switching fragment, but if i change orientation switching doesn't work. For switching fragment I using my OnChangePageButtonClick interface Why is this happening? ViewPager…
wilek
  • 105
  • 2
  • 5
4
votes
2 answers

Android : Access Mapview Inside Fragment With ViewPager

I am Using View Pager to Display three Views. "Filter","Streets","Around" Each View is Defined by Fragment. WHAT I WANT : I want to Use Mapview Inside My FilterFragment. WHAT I HAVE DONE : I want to Use MapView Inside Filter Fragment but Could Not…
4
votes
1 answer

Where is a Viewpager example/tutorial code that works fine for everyone?

I've been looking for a while and I can not find a clear, straightforward ViewPager example that works. I think others are having the same problem and I want to know. I know there are other questions about them but I've tried the websites are they…
jacobohunter
  • 363
  • 1
  • 4
  • 16
4
votes
1 answer

Viewpager not retaining views properly

I have a SherlockFragment thats inflating a layout containing a viewpager that allows me to swipe to a number of tab-fragments which I have created. On the first time this fragment gets attached to my activity everything works fine and as expected,…
Nickolaus
  • 4,785
  • 4
  • 38
  • 60