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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -