Questions tagged [baseadapter]

BaseAdapter is an abstract Android adapter class which is used to implement specialized adapters.

From the documentation of the BaseAdapter class:

Common base class of common implementation for an Adapter that can be used in both ListView (by implementing the specialized ListAdapter interface) and Spinner (by implementing the specialized SpinnerAdapter interface).

Tag Usage:

1659 questions
150
votes
14 answers

notifyDataSetChange not working from custom adapter

When I repopulate my ListView, I call a specific method from my Adapter. Problem: When I call updateReceiptsList from my Adapter, the data is refreshed, but my ListView doesn't reflect the change. Question: Why doesn't my ListView show the new data…
Jasper
  • 2,389
  • 4
  • 25
  • 40
102
votes
6 answers

What's the difference between BaseAdapter and ArrayAdapter?

I want to know the difference between using BaseAdapter and ArrayAdapter. I have been achieving what I want through ArrayAdapters. Does it affect the performance of the ListView on the adapter interface in which it is implemented ? And, the last…
Chintan Soni
  • 24,761
  • 25
  • 106
  • 174
67
votes
4 answers

Difference between getView & getDropDownView in SpinnerAdapter

When you implement SpinnerAdapter you get getDropDownView, how does it differ from getView which you have when you need to extend BaseAdapter.
Win Myo Htet
  • 5,377
  • 3
  • 38
  • 56
46
votes
5 answers

How to customize listview using baseadapter

I wanna create a customized ListView like this: I think that I have to use BaseAdapter but I have no idea about it.
Mohsen Bahman
  • 1,092
  • 3
  • 15
  • 27
44
votes
3 answers

Get application context from non activity singleton class

In my android project, I have ImageAdapter class in which I pass app context for some further needs. public class ImageAdapter extends BaseAdapter { private Context c; public ImageAdapter(Context c) { this.c = c; } …
Dmitry
  • 670
  • 1
  • 6
  • 11
40
votes
2 answers

What is the difference between ArrayAdapter , BaseAdapter and ListAdapter

Could you please tell me difference between ArrayAdapter , BaseAdapter and ListAdapter.
Kanaiya Katarmal
  • 5,974
  • 4
  • 30
  • 56
40
votes
5 answers

How to set the ListView Rows Height

The image below shows the height of the rows are not same. I want the rows to have the same height. In my program I'm getting the data from the XML service which I parsed and displays the result on the list view. But the height of the ListView rows…
user755278
  • 1,634
  • 3
  • 16
  • 32
35
votes
4 answers

Detect when BaseAdapter.notifyDataSetChanged() finished

I want to know when BaseAdapter.notifyDataSetChanged() finish and then do sonething. My code: BaseAdapter.notifyDataSetChanged(); mScroller.startScroll(oldX, 0, dx, 0); mScroller scrolls before notifyDataSetChanged() finishes. I want mScroller…
hiepnh
  • 437
  • 1
  • 8
  • 9
29
votes
4 answers

Android: BaseAdapter and getLayoutInflater on separate class file

Right now to populate my GridViews I'm using a extended BaseAdapter class on each of my Android Activities (which are most of them). In order to make it easier to read and maintain, I`m trying to put all the BaseAdapter code in a separate class…
Hito_kun
  • 962
  • 3
  • 13
  • 26
29
votes
4 answers

SearchView In ListView having a custom Adapter

Guys I am in need of some help.I have been trying to implement a SearchView in my project.But my project contains a listview with a custom adapter attached to it..I have searched many sites but all have examples implemented using an…
AndroidMech
  • 1,676
  • 3
  • 20
  • 31
29
votes
6 answers

How to use search functionality in custom list view in Android

I have created a list view with multiple items in row. I have also created a search box above. I want to implement search functionality on the basis of particular fields of the list. How can I achieve this? Any help will be appreciated.
Nitesh Kabra
  • 509
  • 2
  • 9
  • 17
25
votes
3 answers

Android, List Adapter returns wrong position in getView

I have found a mysterious problem that may be a bug! I have a list in my fragment. Each row has a button. List shouldn't respond to click however buttons are clickable. In order to get which button has clicked I have created a listener and implement…
Hesam
  • 52,260
  • 74
  • 224
  • 365
24
votes
5 answers

Edittext in Listview android

I have Listview with editext and textview. When i touch on edittext then edittext lost focus! I resolved this problem by setting android:windowSoftInputMode="adjustPan"(AndroidManifest.xml). Now i touch on edittext than editext get focus but…
user1206620
23
votes
5 answers

Using Butter Knife in Custom BaseAdapter SubClass Results in "Unable to inject views" error

I'm attempting to use Butter Knife to simplify creation of a custom BaseAdapter class. I'm following the example here: http://jakewharton.github.io/butterknife/ under the "Another use is simplifying the view holder pattern inside of a list…
reggie3
  • 1,018
  • 2
  • 15
  • 22
22
votes
2 answers

Skipped 60 frames! The application may be doing too much work on its main thread

I'm working on a App that should get a JSON response from a webservice and write every element in a listview, I have read that I should work with AsyncTask to get the HTTP Response and I did it and I could retrieve data from the webservice and…
user1079425
1
2 3
99 100