How to get item from listView onItemClick in android? -


i'm working on app , in app i've created custom listview. populating listview api call.now on click of perticular list item want data shown on index. shall change in below code

  vehicle_select_listview.setonitemclicklistener(new adapterview.onitemclicklistener() {         @override         public void onitemclick(adapterview<?> parent, view view, int position, long id) {              imageview selectedimage = (imageview) view.findviewbyid(r.id.checkbox);             selectedimage.setimageresource(r.drawable.simplecheck);            string str =  parent.getadapter().getitem(position).tostring();              toast.maketext(getapplicationcontext(), "  " + str , toast.length_short).show();         }     }); } 

please help. thank you

simple that. parent.getitematposition(position);


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -