android activity - listView- how can you make each item clickable -


i have list of items on listview when 1 pressed open new activity. can help?

this question potentially google-able i'll put code here anyway.

listview can have listener attached listens clicks of list items:

listview.setonitemclicklistener(new listview.onitemclicklistener() {         public void onitemclick(adapterview<?> parent, view view, int position, long id) {             youritemtype item = (youritemtype)parent.getadapter().get(position);             yourinfo info = item.getinfo();             intent intent; //instantiate intent here info             startactivity(intent);         }     }); 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -