The message below corresponds to what I understood. So do not be shy if you want to improve it, instead of criticizing a particular point.
private ArrayList<HashMap<String, String>> mProjectsList = new ArrayList<HashMap<String, String>>(); (You can use any cursor or array that actually consists of data, and you want to link it using an adapter)
public int getCount () -> provides you with Total Elements present in your adapter (e.g. array size)
@Override public int getCount() {
public Object getItem (int position) -> indicates which element was clicked, just return here the way I specified the position. It actually returns the entire biwa that you clicked with all its properties, and so we just return here the view of the position we clicked to tell the BASEADAPTER class that this view is clicked
@Override public Object getItem(int position) {
public long getItemId (int position) will provide the main identifier that you want to return when you melt in any element of the list. when you actually click on any element of a list, it returns two things of primarykey of a long format and an int format position.
from this method getItemId (), which returns the primary key.
we usually specify the primary key as "_id" in our database, so when we use simple adapters instead of extending the baseadapter class, it automatically returns the _id field as the main identifier in a long format. But we must manually indicate here in the BaseAdapter that we want to return
@Override public long getItemId(int position) {
public View getView (int position, View convertView, parent group of ViewGroup) actaully creates a view in which you link your own layout
@Override public View getView(int position, View convertView, ViewGroup parent) {
You just need to bind this adapter to your control, since we redefine the methods here everything will be processed automatically on its own.