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
3 answers

how to handle check box event in list view item in android

i have developed an application that have one list view and that list view's one item contain one image view one text view and one check box so my question is how to handle check box checked and unchecked event of particular list view item Adapter…
user2776223
1
vote
0 answers

Android GridView with customized numbering

A normal GridView in Android works like the below example: What I need is a slightly different numbering style. That is starting from buttom to up and on each row the numbers would be reversed: I want to use this as a base of a simple snake and…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
1
vote
0 answers

Why is my ListView empty?

I am new in Android. I have followed some tutorials about ContentProviders and Loaders. I have created a Notepad application, but I think it fails to save the content into database. I have two activities: NoteList with the list of notes and NoteEdit…
1
vote
1 answer

Is it inefficient to fetch again an object from the db in Android?

I come from the web world, I'm new to Android. In the web world, you usually pass the id of things, from the "list view" to the "detail view", example: URL: Messages/List --> Message/Detail?messageId=x In Android, I have this activity with all my…
sports
  • 7,851
  • 14
  • 72
  • 129
1
vote
1 answer

Navigation Drawer Listview does not update new items even after calling notifyDataSetChange() on Adapter

I have a ListView rendered on a Navigation Drawer. The content of the list view is provided by my custom adapter (derived from BaseAdapter) which appends two arrays one after another like below *@Override public int getCount() { return…
Rakesh Jha
  • 55
  • 6
1
vote
2 answers

Android ListView get last selected item and get last selected item from other ListView in onItemClick

I have two ListView. Both of them use the same adapter. I want to choose items mutually exclusive from these two lists. For every item in list view I have layout
Ray
  • 1,788
  • 7
  • 55
  • 92
1
vote
1 answer

doInBackground (Agenda. .. params) does not return bitmap image in listView

I'm 3 days ago now looking for an answer and find no satisfying. I created a listview to populate it with a picture and a text, the way the image is saved in sqlite database and image is in sd card of the phone, but only that not all rows from the…
1
vote
0 answers

Sharing an adapter between two fragments

I have two fragments nested within another fragment. One is a list view, and one is a ViewPager, with the viewpager's content being details of a selected list view item. Obviously, they both use the same adapter. The contents of the adapter is…
rperryng
  • 3,233
  • 3
  • 22
  • 35
1
vote
2 answers

class cast error while using image adapter in grid view layout in android

i have developed an application that have grid view layout and there are two item main item is image and sub item is text of image so i use custom image adapter class and it implement in main activity but i got error of class cast exception in log…
user2776223
1
vote
3 answers

How to filter ListView adapter by ignoring case?

String filterText="abc"; adapter.getFilter().filter(filterText); I want to filter my adapter even if : filterText="Abc"; or filterText="aBc"; and so on.
Madhav Bhattarai
  • 847
  • 2
  • 10
  • 29
1
vote
1 answer

Grid View - first item on first and last position

I have a fragment with gridview: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { context = container.getContext(); View window = inflater …
Bresiu
  • 2,123
  • 2
  • 19
  • 31
1
vote
0 answers

Android : Custom adapter fails to reload list view on activity resume

I am trying to display received messages using custom adapter on list view , until now everything is working fine , but when I press back and come back and launch this activity again , only message send works but received messages cannot be…
1
vote
0 answers

save nested adapter states (FragmentPagerAdapter + ListViewAdapter)

My Activity has a simple viewPager + viewPagerAdapter: public class SearchFragmentAdapter extends FragmentPagerAdapter { // holds fragments placed in the viewPager private SparseArray mFragments; public…
1
vote
1 answer

Listview - onClickListener's onClick called on reused view

I have list view and every row has multiple clickable areas. In bindView(I use CursorAdapter) I set onClickListener for every clickable area and everything works fine. Problem occurs when I click on view and at the same time notifyDataSetChanged is…
1
vote
2 answers

Android ListView with adapter to highlight selected item row

Sorry if this is answered already, but I can't find anything and I can't specify my search very well. I have a list view in Fragment which uses an adapter to populate it, and I want the list view item rows, to get highlighted for a second when they…
Sartheris Stormhammer
  • 2,534
  • 8
  • 37
  • 81