I am trying to do the following in my application:
I am getting some String values from an some Textviews. I am adding this values to ArrayList<HashMap<String,String>> in the following way,where
cart_list is of the type HashMap<String,String>> and cart is of the type ArrayList<HashMap<String,String>>
cart_list.put("quantity",""+qty);
cart_list.put("item_id"+item_id_number,""+item_id_number);
cart_list.put("Category",Itemname);
cart_list.put("Details",Item_details);
cart_list.put("Price",Item_price);
cart_list.put("Currency",Item_currency);
cart_list.put("images",images);
cart.add(cart_list);
I want to add only unique values to cart. How can I check whether a given value is already present in the `ArrayList>. Please tell me step by step what to do.
ArrayListitem and check each item's HashMap.