tags:

views:

34

answers:

1

I was able get the value of "quantity" in my list when I use on click using this code:

public void onItemClick(AdapterView parent, View view, int position, long id)
{

         Object o = list.get(position);
            HashMap<?, ?> fullObject = (HashMap<?, ?>)o;
            String a = (String) fullObject.get("quantity");  

}

now I want to change the value of "quantity" then update it in my list. any help? thanks a lot

A: 

now I want to change the value of "quantity"

fullObject.put("quantity", whatever);

then update it in my list

Call notifyDataSetChanged() on your adapter, which should reflect your data change in the UI.

CommonsWare
it works. thanks a lot.
John Paul
change HashMap<?, ?> fullObject = (HashMap<?, ?>)o;to HashMap<String, String> fullObject = (HashMap<String, String>)o;
John Paul