i trying itemclick
in listview
not able detect. have tried implement clicklistener
in getview()
method of baseadapter
have tried itemclick
of listview
. not getting kind of success. here snippet.
in give snippet have tried implement clicklistener
in getview()
public override view getview(int position, view convertview, viewgroup parent) { view view = context.layoutinflater.inflate(resource.layout.single_row_listview_item, parent, false); imageview photo = view.findviewbyid<imageview>(resource.id.photoimageview); textview name = view.findviewbyid<textview>(resource.id.nametextview); textview speciality = view.findviewbyid<textview>(resource.id.specialtytextview); stream stream = context.assets.open(places[position].imageurl); drawable drawable = drawable.createfromstream(stream, null); photo.setimagedrawable(drawable); name.text = places[position].name; speciality.text = places[position].specialty; name.click += delegate { commonutils.showtoast(context, "click on name"); }; speciality.click += delegate { commonutils.showtoast(context, "click on speciality"); }; photo.click += delegate { commonutils.showtoast(context, "click on photo"); }; view.click += delegate { commonutils.showtoast(context, "click on view"); }; return view; }
i have tried itemclick , here snippet well.
placelist.itemclick += placelist_itemclick; private void placelist_itemclick(object sender, itemclickeventargs e) { console.writeline("item clicked "); commonutils.showtoast(this,"item clicked"); }
any appreciated.
Comments
Post a Comment