Questions tagged [android-pageradapter]

A base class providing the Adapter used to populate pages inside of a ViewPager.

Base class providing the Adapter used to populate pages inside of a ViewPager. You will most likely want to use a more specific implementation of this, such as FragmentPagerAdapter or FragmentStatePagerAdapter.

More information can be found in the documentation of the class.

Tag Usage:

427 questions
6
votes
5 answers

Remove or Clear All Fragments From ViewPager

I'm populating view pager through fragments likes this pagerAdapter = new PagerAdapter(getSupportFragmentManager()); mViewPager = (ViewPager) findViewById(R.id.container); for (int i = 0; i < 10; i++) { newfragment…
6
votes
1 answer

ViewPager with items preview

I want to show a ViewPager with all the days of the week with a preview of the following and previous item of the current one. I've tried a lot of solutions suggested from stackoverflow but none of them is working. I don't wont to use fragments in…
6
votes
4 answers

Fragments being inflated with old data, when going back to an activity that was stopped

Activity A has fragments. When it starts an intent to activity B, then when B.finish(), A executes onCreate() again. But this time, even though A.onCreate() has a new PacksPagerAdapter and a new ViewPager, the fragments are shown with old data. I…
6
votes
5 answers

setOnPageChangeListener does not call onPageSelected

I've setup a simpleonpagechangelistener using the following example: Android SimpleOnPageChangeListener - Determine swipe direction However when I execute the code then swipe the viewpager I would expect the following line to be called: public void…
5
votes
2 answers

Instantiate PagerAdapter Android

2Hi guys I'm trying to build an app using a horizontal pager and the support package for Android. I've made this exact code compile in another project but the last line of the second code example is not letting me compile. Eclipse is saying Cannot…
JackMahoney
  • 3,423
  • 7
  • 32
  • 50
5
votes
1 answer

Get different data via Retrofit for the Fragment in FragmentPagerAdapter for the several tablayout tabs

Conditions: I have an Activity and I'm creating PagerAdapter extends FragmentPagerAdapter with one Fragment class. TabLayout includes 10 tabs. I have TabLayout.addOnTabSelectedListener and there in onTabSelected() I am updating some custom variable…
5
votes
3 answers

DialogFragment display a list of icons with paging

In my app, users can send an icon/gift to other users. I want to show a DialogFragment popup that includes paging of available icons. For example, I have a total of 15 icons to display. I want to show 6 icons per page, which means i should have 3…
TareK Khoury
  • 12,721
  • 16
  • 55
  • 78
5
votes
2 answers

How to make ViewPager updates frequently?

Im facing a trouble with ViewPager Class, I have three pages each one has a scrollView, Relative Layout and ImageView inside. I need to set a coloured background when i click on an ImageView. My Problem is: When I click on an ImageView to get it…
blueware
  • 5,205
  • 1
  • 40
  • 60
5
votes
1 answer

How to use single Fragment for all the pages in the ViewPager?

In my application I have to show the Student details in ViewPager. I used one fragment (say StudentPageFragment) and I write widget initializing code in onCreateView() like: public static Fragment newInstance(Context context) { …
Sridhar
  • 2,228
  • 10
  • 48
  • 79
5
votes
1 answer

PageTabStrip Class Not Found Exception

Well i have decided to just go with the pagertitlestrip. I am assuming that the support library that i am using does not contain pagertabstrip. i am not sure how to fix this because i thought i had everything updated correctly. Edit: Does this just…
doubleA
  • 2,446
  • 22
  • 45
4
votes
1 answer

Why my PagingSource doesn't give me any data?

The Elements of the project that don't work And I check if data is no null and do default submitList in the fragment. Btw here is the link to the documentation SearchPagingSource These logs aren't even shown class SearchPagingSource( private…
4
votes
1 answer

How to get fragment reference from ViewPager

I am trying to get the reference to a specific Fragment called MyChatsFragment after instantiating it with a custom SectionPageAdapter. First, I am adding the Fragments mSectionsPageAdapter.addFragment(new CatalogFragment()); …
4
votes
2 answers

Viewpager not getting last item

I am using two Viewpager in my app, 1) First Viewpager displays images only 2) I am displaying price now the issue is i have 4 images displaying in my viewpager1, and in second pager i have price as per selected product. first time it does not show…
4
votes
1 answer

destroyItem function of PageAdapter is not being called when any view is removed

I am working on an android application and using viewpager in a view. I am using PagerAdapter to show the views of tabs in viewpager. I have to add/remove some Tabs dynamically. When I am adding any tab along with it's view then instantiateItem…
Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78
4
votes
3 answers

How to make viewpager transition fast with fragment?

Here i have an questions like how to make view pager fast with fragment. Explanation of what i am doing: I have a fragment which contains five web view and one list view to show the respective data.Based on the content count i am loading fragment to…
1 2
3
28 29