Custome Listview with Hashmap in ANDROID

16:13:00 Dhaval Sodha Parmar 2 Comments





1) Go to res/Lauout/main.xml :-

2) Now Nextgot o res/Layout/row.xml :-


3) Now go to main Activity:- 





2 comments:

  1. how can i onclick on list item?????

    ReplyDelete
  2. onListItemClick(ListView l, View v, int position, long id)

    This method will be called when an item in the list is selected.

    you have to create this method like:

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
    // TODO Auto-generated method stub
    super.onListItemClick(l, v, position, id);
    }

    where,

    ListView l : is your listview
    int position: position of listview item(which item is selected)

    ReplyDelete