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
Post a Comment