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

Drop shadow for a ViewPager

Background: I have a DropShadowFrameLayout in my app, which is a container used just to draw a drop shadow over it's child views. Like a shadow on top and bottom of a ListView, you know. It is based on this article:…
Vasily Sochinsky
  • 3,981
  • 2
  • 23
  • 20
4
votes
1 answer

How to use swipe gesture in a view pager's page with android?

I need to take a view pager in an application which consist of three pages. I am new to android view pager. I have one view named TestSwipingView in second half of the screen and another view for the top half of the screen. How do I configure only…
4
votes
2 answers

How to make an Android ViewPager that is continuous?

All of the ViewPager examples that I've found online seem to have a static number of pages that you can swipe through. My app is for my music blog, and I want the user to be able to click a post which opens my SinglePostActivity. It should show the…
jas7457
  • 1,971
  • 5
  • 30
  • 47
4
votes
4 answers

Lock page fragment in ViewPager android

How can I lock paging in fragment activity of viewpager for fragment swipe.I'm performing some operations using progressbar in one fragment.While progressing progressbar fragment gets changes because of swipe action.so while progessing progressbar I…
yuva ツ
  • 3,707
  • 9
  • 50
  • 78
4
votes
1 answer

Flip Images in a viewpager

I have a viewpager for a fullscreen image slider with horizontal swipe. What I am trying to do is put an image behind every image on the slider. Meaning, a user can click on a 'flip' button to reveal another image. Below is my code however I have…
4
votes
1 answer

Changing color of Navigation Tabs programmatically

I'm trying to change the colour of the action bar tabs programmatically. I have them by default in styles.xml as red, which is how I want them with the other tabs in my viewpager, however, on the first tab, I want both the action bar and the…
4
votes
2 answers

How to add custom view in ViewPager for walkthrough

I've used ViewPagerIndicator to get WalkThrough like most popular application. But I can't understand how to add Pictures in ViewPager which shows how to use the application. What I want is like these Walk Through. What i got till now. I…
Vikalp Patel
  • 10,669
  • 6
  • 61
  • 96
4
votes
1 answer

ViewPager and FragmentPagerAdapter with Fragments (not support library)

I would like to use fragments (not support fragments) with a view pager, I understand the v13 library has support for fragments but I don't want to import the whole library for my project. Does anyone know how to find a way round this? e.g an…
AndroidEnthusiast
  • 6,557
  • 10
  • 42
  • 56
4
votes
0 answers

Keeping List View and View Pager in sync

Forgive me if the title is a little vague, I'm having trouble wording this issue, which is also why I am unable to find any examples via Google. I'm using the master/detail flow layout in my application as I mostly develop on a tablet. The…
Scott Cooper
  • 2,779
  • 2
  • 23
  • 29
4
votes
2 answers

Android: Fragment and ViewPager starts always at first position

I use the Master/Detail design for my Android application. If I click on a item in the listview in my ItemListActivity the position is given to my ItemDetailActivity. This one implements the ViewPager and the FragmentStatePagerAdapter. So I want to…
Mokkapps
  • 2,028
  • 9
  • 42
  • 67
4
votes
1 answer

How to dynamically add image to a viewpager containing imageview?

I have a viewpager in my main_layout. The view pager contains only an ImageView wrapped by RelativeLayout What i would like to do is when a user click on a button, it will add an image to that particular viewpager. I found this answer here on…
Jeremy
  • 2,516
  • 8
  • 46
  • 80
4
votes
1 answer

Get ViewPager views from MainActivity

I'm working on an app which uses a ViewPager with two swiping views (first_page.xml and second_page.xml) and has one activity (activity_main.xml). When in the main activity class I try to access TextView (which is located in the first_page.xml)…
Andrea
  • 43
  • 1
  • 3
4
votes
2 answers

Android Service > Activity > Fragment with ViewPager

First, I'd to state that I've been searching for a solution for this problem for three days now, that may means either I'm not asking the right question or not using a good approach. If any, please guide me in the right direction. This is the…
4
votes
1 answer

Fragments not getting recreated by FragmentStatePagerAdapter after coming back to the main Fragment instance

SCOPE I am making an application for my college fest which shows events for 4 particular fixed dates. I have a main_activity which has a linearlayout on which each and every fragment is displayed. Now a I have a Fragment…
4
votes
0 answers

ViewPager wait to finish before all Fragments are done

I have a situation where All of my Fragments of ViewPager are doing DB activity onPause. This piece of code is working fine until I recently implemented sqlcipher. Because of sqlcipher code, my execution is little slow and if I come out of pager…
Chinta
  • 85
  • 1
  • 8