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

How to title/name each fragment separately to appear on PagerTitleStrip?

How to title/name each fragment so that their respective names appear on the PagerTitleStrip?
Haxor
  • 2,306
  • 4
  • 16
  • 18
0
votes
1 answer

Android PagerAdapter new view at end

At the moment I have a custom PagerAdapter class in my android app that basically gives a new flash card for each swipe using cursors. At the beginning it gives a custom XML that would basically give instructions (swipe left for previous, right for…
user2525981
  • 159
  • 1
  • 3
  • 10
0
votes
0 answers

Pass the ArrayList got error and String Array works fine in PagerAdapter?

I am calling a Pager Adapter from my Activity. I am getting the data from the JSON and passing into the ArrayList mSlidedata ImagePagerAdapter adapter = new ImagePagerAdapter(mContext,…
Akarsh M
  • 1,629
  • 2
  • 24
  • 47
0
votes
1 answer

Semitransparent PagerTabStrip with actionbar overlay

I'm using a actionbar with Window.FEATURE_ACTION_BAR_OVERLAY and some transparency. Additionally I'm using a ViewPager with a PagerTabStrip. The problem is the PagerTabStrip is now displayed underneath the actionbar. Applying a margin to the…
0
votes
1 answer

how can i use array list of activities instead of using multiple fragments

in my project which about viewing multiple activities with swipe i have been used the fragments idea and my code work very well ,, but this morning my manager asked me to convert the array list of fragments to array list of activities but really i…
0
votes
2 answers

PagerAdapter; add a LinearLayout class that adds a layout -> tiny width

I have an activity, called CollectionActivity, with a viewpager. The viewpager has it owns adapter, PagerAdapter: CollectionPagerAdapter extends PagerAdapter. The important instantiateItem method: @Override public Object instantiateItem(View…
0
votes
0 answers

PagerAdapter/ViewPager related OutOfMemoryError

I have extended the PagerAdapter class to create a custom adapter. In a strange way it behaves differently on different devices. For example on an Android 4.0.3 tablet, the viewpager tries to instantiate all the items which causes the…
sarslanhan
  • 517
  • 2
  • 7
  • 13
0
votes
1 answer

Using ViewPager for Screen Slides

I'm trying to use ViewPager to implement screen slides. In my start activity, there is one line like the following, which is also the error: "The constructor PhotoActivity.PhotoSlidePagerAdapter(FragmentManager) is undefined" import…
Fihop
  • 3,127
  • 9
  • 42
  • 65
0
votes
0 answers

android: view pager and DisplayImage loader , NullPointerException

i have some nasty bug in app that i develop, basicly in the mainactivity i have twolistview and one page adapter that load data from web - save to sql - then display on the view, all function is doing fine just one problem in displaying image to…
Abdullah
  • 13
  • 1
  • 3
0
votes
2 answers

Viewpager position 0 doesnt work with onPageSelected(0)

I cant set value for start page (position 0) I mean QuestionPagerAdapter.tv.setText("default") must work in MainActivity's onPageSelected(int position) case 0: but it gives nullpoint. but it works for position > 0 PagerAdapter: public class…
metemet06
  • 1,472
  • 4
  • 18
  • 30
0
votes
1 answer

how to update selected answer radio button in PagerAdapter?

I am trying to update the view of the page as soon as one of the 3 radio buttons are selected so that when i again come to that view i get that answer already checked. I am getting all data properly as swipe views but my selected answers is not…
Bhargav Vashi
  • 47
  • 1
  • 1
  • 8
0
votes
2 answers

Add button to a specific fragment in ViewPager

I found the ViewPager in the android SDK and was messing around with it. Basically my final task is to create a youtube, facebook, and twitter feed all in one app, using the ViewPager and Fragments to scroll between the 3 categories. I'm having a…
0
votes
1 answer

Setting Height as WRAP_CONTENTto ViewPager not happening

I have images inside ViewPager. I have read that we cant set Wrap_CONTENT as height of ViewPager as it wont work. So what should I do to diplay images in proper aspect ratio as the images size may vary. So what can I do to achieve this. Suggestions…
Vaibs
  • 1,128
  • 3
  • 16
  • 36
0
votes
1 answer

How to call OnClickListener in a Pager Adaper

I've been working on this for a week now and I just can't figure it out. I have a Pager Adapter with 4 views. It lets me swipe between them. But when I call onClickListener the app crashes on boot because the Listener is null. I'm a new programmer…
Jason Cheladyn
  • 565
  • 1
  • 12
  • 24
0
votes
3 answers

Getting Null pointer exception: don't understand

I am trying to swipe page horizontally but i am getting NullPointerException. I am trying to swipe 3 page and i am using textview and onclicklistener on that textview in one of those page.When i run application it continually showing exception. …
Sandip Armal Patil
  • 6,241
  • 21
  • 93
  • 160