Questions tagged [android-adapter]

An Adapter object acts as a bridge between an AdapterView and the underlying data for that view.

An Adapter represents the connection between a View with some kind of data source. Adapters generally come in two flavours: those representing array/list based data and those that represent Cursor based data.

  • The Adapter provides access to the data items.
  • The Adapter is also responsible for making a View for each item in the data set.

See Adapter reference for more information.

Tag Usage:

3394 questions
1
vote
0 answers

Looking for getting contacts syncing from Android phone to Server

I am loking for a account syncing with Android Account then getting contact from the phone to the Server. I have gone through certain links for the same but this helped me to getting My account into the Account & Sync Section Link but not getting a…
1
vote
1 answer

Async loading of images in a CustomListView from MediaFiles

I am developing a music app and my app takes a lot of time to generate the list of music files(because it has to generate the bitmaps) so I searched the net and came to know about the asynctask, I was able to implement it successfully in one…
1
vote
1 answer

Android : want to access to a textview in a viewholder in my mainactivity

I am so sorry for my bad English, but here is my problem : I use a custom ListView like ArrayAdapter and I create my ArrayAdapter as a intern class in my main Activity like that : /*This is my Main Activity*/ public class …
1
vote
1 answer

How to notifyDataSetChanged in Activity for an Adapter in a separate fragment

I have an Activity which has a ListFragment of "Groups" of your friends. The groups are saved in the sqlite database. When we click a Group it brings us to another activity page. This page shows the participants of that specific group. On the…
Terence Chow
  • 10,755
  • 24
  • 78
  • 141
1
vote
1 answer

ExpandableListView OnChildClickListener with checkbox row not fire when scrolling

I have an BaseExpandableListAdapter look like this: public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { final ContentViewHolder contentViewHolder; View…
ductran
  • 10,043
  • 19
  • 82
  • 165
1
vote
1 answer

WindowManager null

I written separate class of adapter for gridview present in fragment. If a called windowmanger first time from adapter constructor it worked but if i changed orientation windowmanager becomes null. I written code for getting window manager…
Swapnil Deshmukh
  • 665
  • 1
  • 6
  • 23
1
vote
2 answers

ViewPager findFragmentByTag returning null

I am using FragmentStatePagerAdapter and I need to get the current fragment. So every time I swipe to a new page I need to get some data from that fragment. So this is what I did on pageChange: mViewPager.setOnPageChangeListener(new…
1
vote
1 answer

Image Adapter + Gallery imaging looping

I have a problem with one of the applications I'm working on. When I press the gallery button and it starts to load it shows all the pictures but its the same photos in the grid except once pressed, it's not the same image as shown in the gridview.…
Kodi
  • 109
  • 1
  • 2
  • 12
1
vote
1 answer

android how to create a multiline list view

I am trying to create a list item which consists of two list item on above the other. The code I am using is this: package com.example.list2; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import…
Shivam Bhalla
  • 1,879
  • 5
  • 35
  • 63
1
vote
2 answers

Null Pointer Exception in LayoutInflator

I am getting a Null Pointer Exception at LayoutInflator in my ExpandListAdapter class that extends BaseExpandableListAdaptor. import java.util.ArrayList; import android.content.Context; import android.view.LayoutInflater; import…
1
vote
2 answers

android arrayindexoutofbounds exception while using listview

I am getting an arrayindexoutofbounds exception. My adapter code is import android.app.Activity; import android.content.Context; import android.graphics.Typeface; import android.view.LayoutInflater; import android.view.View; import…
1
vote
1 answer

custom sticky gridview arrayIndexOutOfBound in adapter

I'm using the the next custom grid view: https://github.com/TonicArtos/StickyGridHeaders I have an issue in the adapter where i receive ArrayIndexOutOfBound. The list size is 3 and the number of headers is 2. The getView() method works with position…
Shalom Melamed
  • 299
  • 1
  • 4
  • 13
1
vote
1 answer

How do I navigate through and understand the documentation in Android?

I got one piece of code to study and I was puzzled for a long time because I tried to make my own version of it and it broke then I tried commenting the original code step by step to see when it failed and it gave me a null pointer in a getView…
Thiago
  • 746
  • 1
  • 10
  • 22
1
vote
2 answers

Spinner with custom layout doesn't show nothing Android

in my application I must use a spinner that should show three items (IT,EN,PR). I must also use a personalized layout. The code is in an another adapter in onCreate method: holder.spinnerLenguage = (Spinner) convertView …
hasmet
  • 758
  • 3
  • 13
  • 32
1
vote
1 answer

How to avoid reloading of images in items of custom list view in android when async task is used

I am getting image url path from a service,which i have to display in my list view(which also has to display other text which i get from service).Here is the code for image download from url path(which i got from …