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

GridView with an array of data in every cell

I have a GridView for students and think like I fill every cell with one student name, and in every GridCell that student has name he also got all marks that he got for whole year in the same cell. So in every cell I have like: a gridview …
wertigom
  • 313
  • 1
  • 3
  • 11
1
vote
2 answers

Android: stop repeating images in listview, performance issue

i have an arrayaadapter where i am retrieving the phone contacts numbers with images and displaying it in the list. @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view…
teekib
  • 2,821
  • 10
  • 39
  • 75
1
vote
1 answer

listview isEnabled() called twice

I have a custom adapter where I override the isEnabled()method. I have noticed that when the method gets called, it's called on, touch down and on, touch up. This is kind of irritating if you want to perform some action. Lets say you show a Toast…
HGPB
  • 4,346
  • 8
  • 50
  • 86
1
vote
0 answers

ViewPager and empty listview when rotate

When I start my application the first activity is TabsActivity, this is a FragmentActivity and in this activity there is a ViewPager and I can change of fragment by sliding left or right. But when I rotate my device, the current fragment is well…
guillaume
  • 1,638
  • 5
  • 24
  • 43
1
vote
1 answer

android: buttons created using button adapter is not in the right order

new to android. I created 12 (3 rows, 4 columns) buttons in a GridView and I created a toast to display something after a button is pressed by following a tutorial. The buttons are displaying on the screen correctly, but the toast messages are not.…
lamba
  • 1,581
  • 5
  • 18
  • 29
1
vote
0 answers

notifyDataSetChanged not updating my spinner

I have 2 spinners with two different adapter's (adapter and adapter2). Based on my selection of my first adapter (adapter), I am populating my second spinner (adapter2). After changing the data in the first spinner I called for…
user1163234
  • 2,407
  • 6
  • 35
  • 63
1
vote
1 answer

AmazingListView Adapter Not Downloading?

I need to work on Android ListView. I want to Download this code from here. I was unable to download this code. but it give me this message # Non-members may check out a read-only working copy anonymously over HTTP. svn checkout…
1
vote
1 answer

What's up with my custom adapter (android)?

I made an adapter for my ListView like so : SimpleAdapter adapter = new SimpleAdapter(this.getBaseContext(), listItem, R.layout.list_cell_icon, new String[] { "img", "title", "description" }, new int[] { R.id.img, R.id.title, R.id.description })…
Alexis
  • 16,629
  • 17
  • 62
  • 107
1
vote
1 answer

Generic ListView Adapter

I am trying to create a Custom Adapter which can handle any kind of layout to be inflated. By generic I mean any kind of data to be set in an adapter and any kind of a layout could be used with Event Listeners to be set for an item. For example: I…
Ahmed
  • 2,966
  • 7
  • 42
  • 69
1
vote
1 answer

A chart gallery with viewpagerindicator and achartengine

I'm displaying ACE charts using the styled tabs of ViewPagerIndicator The first displayed chart is always OK. But when you horizontally swipe to second page, the second chart is bad displayed. You have only a half chart I don't know how to…
1
vote
0 answers

Null pointer exception on Adapter filtering

I want to simply filter my listViews's items by an EditText, i do this with ArrayAdapter implementing Filterable but for some reason i got a massive NullPointerException... I did this by some tutorials and i just cant figure it out what is the…
Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222
1
vote
1 answer

ArrayList is Empty and Getting Error

I have this in my Fragment extends ListFragment: try { FileInputStream in = getActivity().getApplicationContext().openFileInput("list"); ObjectInputStream i = new ObjectInputStream(in); myData = (ArrayList
1
vote
0 answers

I/InputReader( 304): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0

To make the listview smoother, I decided to use an array to save view generated by getView () each time to reuse, in order to avoid duplicate getView(), so they inherit the BaseAdapter to write MyBaseAdapter. Ultimately, the effect is very good,…
1
vote
1 answer

How to delete row from a list, reload listView and then write a string in existing file?

I want to delete an array index from an array, then reload listView with my new array and then write a string to an existing file in android. I am using following code: OnItemLongClickListener longClickListener = new OnItemLongClickListener(){ …
1
vote
1 answer

How can I refresh the arraylist after remove element?

I have class extended from listactivity, and contain arraylist of hashmap I can remove the element from data base, but I can't view the update until to switch to another activity and return to it. How can I refresh the arraylist after each…
SWE
  • 131
  • 2
  • 7
  • 20