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

Fragment Implementation

I am new to Android Coding so this might seems to be simple, but please help me solve my confusion about Fragment: Can a fragment "do stuff" like Activities (like call some methods, run some schedule task. Or it is more like a view to display the…
0
votes
2 answers

fragmentStatePagerAdapter correct data but incorrect adapter on my Fragment

I have a ListFragment to show a list of data based on a specific day. This day is passed as an argument from the getItem() function of my fragmentStatePagerAdapter. public Fragment getItem(int position) { Calendar calendar =…
Andreas Lymbouras
  • 1,025
  • 17
  • 26
0
votes
0 answers

ViewPager image galley out of memory

I am using a ViewPager with a PagerAdapter to show one ImageView per page. The images are full screen but they are not even that large: 120-320 kb per picture and 720 x 940 px resolution. My code is supposed to destroy the ImageView when changing…
0
votes
1 answer

Android pager-adapter timer gets confused on user touch

i have a problem with my Pager adapter timer , when user touches to adapter,and if user slides the image ,its working fine. but ,if he doesn't slide the image , my timer is getting faster and sometimes goes to next image. here is my pager adapter…
Alp
  • 1,863
  • 1
  • 20
  • 38
0
votes
1 answer

IllegalStateException with PagerAdapter when setting current item

I am using a ViewPager with a custom PagerAdapter to show a gallery. The gallery can receive a new object through the method onObjectReceived(); if the position of the new object is less than or equal to the current position, the current position…
Alessandro Roaro
  • 4,665
  • 6
  • 29
  • 48
0
votes
1 answer

android pager fragment behaving unexpectedly

I essentially copy pasted the activity that implements the swiper. The code that I added is the test increment. This is what happens: App starts (I'm swiping left and right: Section 1: 1 Section 2: 1 Seciton 3: 1 (everything is good up to…
tipu
  • 9,464
  • 15
  • 65
  • 98
0
votes
0 answers

swipe tabs inside a fragment with pages from same class

I created a swipe tab view inside a fragment. I tested this in a FragmentActivity with no issues. I tested with pages that consisted of different fragment classes and fragments all from the same class... again no issues. Then, I changed the…
0
votes
3 answers

IllegalStateException because notifyDataSetChanged() on PagerAdapter not called

I have the following situation and couldn't find a solution so far: In Activity A there is a ViewPager with a FragmentStatePagerAdapter. From Activity A you call Activity B. There you can change the some global data, what also affects the number of…
0
votes
1 answer

Updating data in FragmentPagerAdapter

I have main fragment and Viewpager with 3 pages in this fragment(1). In main fragment(1) i choose city and acording to the value of the city main fragment(1) loads data from server and pass in to FragmentPagerAdapter. At first time everything is ok…
SERG
  • 3,907
  • 8
  • 44
  • 89
0
votes
2 answers

Tabhost and fragment Activity

I am unable to understand properly what these functions are used for in my FragmentActivity class. viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageSelected(int pos) { …
0
votes
1 answer

How to use same fragment in a viewPager?

I develope currently a small sample app with fragments and a viewPager. The viewPager shows 3 pages. In each page i instantiate a fragment of the same type. The fragment contains a textView and a button. On button click I want to replace the current…
0
votes
1 answer

Viewpager out of memory?

First of all I do not get any error. My problem is that I do not see the pages 2&3 (out of 4) in the ViewPager. Let me explain: First all I add directly the pages inside the layout without fragments:
Diolor
  • 13,181
  • 30
  • 111
  • 179
0
votes
0 answers

ImageButtons on Pages-Problems (Android)

i have a few pages realized with a PagerAdapter and within that some LinearLayouts, which have some ImageButtons. My Issue: i want to get the imagebuttons from all the layouts from my pages on app-start, get the size of them and to resize the images…
treesoft
  • 295
  • 2
  • 14
0
votes
0 answers

Calculate page width in a PagerAdapter

As Gallery View is deprecated, I'm trying to find a solution to implement an Horizontal List with different views (linearlayouts). The first option was to use HorizontalScrollView it's fine, but I have to generate all the view by code and all views…
0
votes
1 answer

setPageTransformer() doesn't work with PagerAdapter

I want to customize animation of ViewPager. So I implements ViewPager.PageTransformer and call setPageTransformer(). It worked well with FragmentStatePagerAdapter or FragmentPagerAdapter. But not PagerAdapter. When I call setPageTransformer() (even…
Huy Duong Tu
  • 7,798
  • 5
  • 25
  • 46