android - How to show Tapped Product Information in WishProductDetails.java -
like: see in cart apps, when user selects item(s) , @ last stage he/she wants change quantity of item, here allow user tap on item in list view update quantity of item, , once user tap on item in list view, show him/her existing detail of item, has been tapped....in same way want allow user tap on item , want show him existing detail item....just want show existing product information has been tapped user in wishproductdetails.java
still able show wishproductdetails.java not able show tapped item details in activity..
i using below code show existing item details in wishproductdetails.java have clicked in cart activity using list view item row...
hashmap<string, string> item = constant.wishproducts.get(position); log.d("cartadapter", "onclick :: " + item); intent myintent = new intent (activity, wishproductdetails.class); log.d("cartadapter", "intent :: " + myintent); myintent.putextra("item", item); activity.startactivity(myintent);
work related add item cart , accept quantity of item, such works doing wishproductdetails.java
now want whenever user click on of listview item row, need show particular item in wishproductdetails.java activity along existing details.
i guessing using imagebutton remove item cart, have never worked on kind of project writing think, like:
mimgbtndelete = (imagebutton) vi .findviewbyid(r.id.mimgbtndelete); mimgbtndelete.setonclicklistener(new onclicklistener() { public void onclick(view v) { // todo auto-generated method stub constant.wishproducts.remove(position); notifydatasetchanged(); }
edit #2
code update item using on listview item row
i think in adapter class, should add code below, update quantity of item while click on item row, frank don't know how open particular item in wishproductdetail.java (where allowing user enter quantity)
public view getview(final int position, view convertview, viewgroup parent) { // todo auto-generated method stub view vi = convertview; if (convertview == null) vi = inflater.inflate(r.layout.cart, null); vi.setclickable(true); vi.setfocusable(true); vi.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { hashmap<string, string> prod = constant.wishproducts.get(position); intent mviewcartintent = new intent (activity,productinformationactivity.class); mviewcartintent.putextra("product", prod); activity.startactivity(mviewcartintent); } });
Comments
Post a Comment