Right now you're probably updating other views, also the counter variable use it's not ok. The right way of handling those row number pickers would be to save their current values in some data structure and set/update the current value from that list:
View vi = convertView;
ViewHolder holder;
if(vi == null) {
holder = new ViewHolder();
vi = inflater.inflate(R.layout.materialdialogcontent, null);
//Initialize Buttons and TextViews.
vi.setTag(holder);
} else {
holder = (ViewHolder)vi.getTag();
}
holder.txt.setText(data.get(position).getName());
holder.add.setTag(position); // so we have the proper position in the onClick method
holder.add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// there's no need for counter
int position = v.getTag();
// numberpickervalues is the array/list of int values representing the values from all the row
// update the proper value
int temp = numPickerValues.get(position);
temp += 1; // incremment the value
numPickerValues.set(position, temp);
notifyDataSetChanged(); // let the list know about this change
}
});
holder.num.setText(String.valueOf(numberPickerValues.get(position)));