I’m making use of a List<? extends Map<String,?>> that I populated with data.
cursor.moveToFirst();
while (cursor.getPosition() < cursor.getCount()) {
item.put("ProdName",cursor.getString(2));
item.put("ProdSize", cursor.getString(3));
item.put("ProdPack",cursor.getString(4));
item.put("OrdQty","0");
//list.add(item);
list.add(i, item);
item = new HashMap<String,String>();
cursor.moveToNext();
i = i + 1;
}
How do I update a value for example in the OrdQty field?
@Duffymo is right, you shouldn’t use a map as a pseudo-object.
This is how to update an object at a specific place (
index) in a list.Then you can do whatever you want with the object ugly.
If you did it properly, it would look like this…