I have a viewholder in my Android app and I tried to set an incremented value on a textfield. I tried it like following,
Activity
> But this is incrementing randomly
that is because the viewholder may belong to different order-lines.
Example
how to fix this:
you need an objectmodell that store the data inc, articleid, quantity, unitprice, articlename, ......
final OrderItem orderItem = (OrderItem) objects.get(position);
...
orderItem.inc++;
See also https://stackoverflow.com/search?q=listview+random