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
1 answer

Multi-Pane fragments within viewpager

I'm currently working on an app that will hopefully act like an "eBook" player. Having read through a number of tutorials related to fragments, I decided to take the 'Fragment/ Viewpager' approach. Moving into a little more detail, I decided to…
HaxStar
  • 71
  • 6
4
votes
2 answers

Trouble with ViewPager displaying Fragments

I am trying to get a fragment with three tabs displayed using ViewPager. Initially I used to instantiate the fragment from the Activity using FragmentMgr, this worked fine. When I converted this navigation using ViewPager, this Fragment is no longer…
4
votes
1 answer

How to implement horizontal swipe inside a fragment?

I have two fragments with-in an activity. I want to implement swipe in one of those fragments. My layout is:
Jainendra
  • 24,713
  • 30
  • 122
  • 169
4
votes
0 answers

How to make viewpager items larger than screen?

I have viewPager's views children which should be larger than the screen. How can I make this work, and keep the "pagination effect"?
user1885718
  • 161
  • 2
  • 7
4
votes
1 answer

Replace Fragments Position inside ViewPager

I have ViewPager that contains two Fragments [ Fragment 1] [Fragment 2]. Now based on a selection in [Fragment 1] a new fragment will be added To ViewPager and it will look like this [Fragment 1] [NewAddedFragment] [Fragment 2] and also based on…
user4o01
  • 2,688
  • 4
  • 39
  • 54
4
votes
1 answer

FragmentPagerAdapter displays all fragment contents on first page

In memory, I have a list of Items, each with a title and a list of 0..N Chunks (which store some information). I know that I am creating this list in memory correctly as I've output the whole structure to the command line. I have an activity that…
4
votes
0 answers

Hide tabs in viewpager

I am using Actionbarshelock library. I have three tabs. each tab contains a fragment. In my middle tab I have sliding drawer. I want to hide action bar as well as tabs from screen so that i can gain more space for sliding drawer. I hide the action…
Sunny
  • 14,522
  • 15
  • 84
  • 129
4
votes
1 answer

android ViewPager xml inflate error

I'm learning how to implement horizontal swiping and I'm getting the following error while trying to launch my app having ViewPager in its layout. 03-25 17:12:13.166: E/AndroidRuntime(19449): FATAL EXCEPTION: main 03-25 17:12:13.166:…
Poonam Anthony
  • 1,848
  • 3
  • 17
  • 27
4
votes
1 answer

Nested Fragments lose calls to onCreateOptionsMenu after screen rotation

I implemented an Activity (A) that displays only one fragment (PF) with getSupportFragmentManager(). Fragment (PF) has one ViewPager to display 2 Fragments (F1 and F2). ViewPager uses FragmentPagerAdapter with getChildFragmentManager(). Relative…
4
votes
1 answer

How to Customise PagerTabStrip with stripDrawable and spacing

I have a Viewpager and want to set title for the same. I am able to do this. But customizing the same is creating problems for me. 1). I dont want the default strip below the title instead I want my selection bar to be in that place. I know we can…
Vaibs
  • 1,128
  • 3
  • 16
  • 36
4
votes
2 answers

Get GoogleMap from ViewPager's fragment

I'm trying to get GoogleMap object from a Fragment, which is on the second page of ViewPager, whose contents are given with FragmentPagerAdapter. My ViewPager consist of two pages: an ordinary layout, and a Google map. I can access to the first…
4
votes
1 answer

Create an infinite ViewPager scrolling in one direction

I am a newbie in Android programming and this is my first question on this site. I have spent lots of time searching for this issue but haven't find an answer that suit my case. I had two pages in ViewPager, one for the current, one for the next…
dvtrung94
  • 43
  • 4
4
votes
1 answer

Replace ListFragment with Fragment inside ViewPager with Tabs

I try to setup following navigation in my app: Actual condition: ViewPager + Tabs to swipe between lists: ListFragment A ListFragment B Desired condition: ViewPager + Tabs: ListFragment A onListItemSelected replace ListFragment A with…
0xPixelfrost
  • 10,244
  • 5
  • 39
  • 58
4
votes
1 answer

Access TextView in ViewPager from Activity

I have an Activity with a ViewPager containing multiple fragments. how can i now access a TextView in one of that fragments to change its text from the main activity? I tried multiple ways and they all ended in a…
danijoo
  • 2,823
  • 4
  • 23
  • 43
4
votes
0 answers

Slowing down the speed of the View Pager in android

I wanted to stop the normal swipe effect of the ViewPager so I achieved it with CustomViewPager class.... But I want to show my other fragment in the pager with the title bar click on the first fragment with the same slide animation of the pager...…