android - Click on ListView Item not working, I have three textviews and a button in my each ListView Item -
i writing app in trying to open activity , update item detail using tap on item in listview
problem:
whenever click on item in listview, not able start activity , want know how update item detail...
i have 3 textviews , button in each listview item
by using below code in cartactivity, not able open productinformationactivity
listview mlstview1 = (listview) findviewbyid(r.id.listview1); cartadapter mviewcartadpt = new cartadapter(cartactivity.this); mlstview1.setadapter(mviewcartadpt); mlstview1.setonitemclicklistener(new onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { intent intent = new intent(cartactivity.this, com.productinformationactivity.class); startactivity(intent); } });
cartadapter.java:
public view getview(final int position, view convertview, viewgroup parent) { // todo auto-generated method stub hashmap<string, string> item = new hashmap<string, string>(); item = constants.mitem_detail.get(position); // setting values in listview title.settext(item.get(com.productinformationactivity.key_title)); qty.settext(item.get(com.productinformationactivity.key_qty)); cost.settext(item.get(com.productinformationactivity.key_cost)); total.settext(item.get(com.productinformationactivity.key_total)); return vi; }
have added ativity manifest file? need add activity in application tag:
<activity android:name="com.erachnida.restaurant.versionoct.menu.productinformationactivity" />
Comments
Post a Comment