title: Number picker in custom listview changing number by itself
body: <p>I am working on app in which I am using a Custom ArrayAdaptor to populate my listView.The customoized row includes a number Picker  along with some text boxes in its activity.
  Now the Problem Part-->
  The funny part is that when i am changing the number of number picker in a particular row other number pickers of other rows get changed automatically.I have been staring at my code almost 2 days now .Please help </p>
  
  <p>Custom_row.java</p>
  
  <p>public class Custom_row extends ArrayAdapter {</p>
  
  <pre><code>static Button ProPay;
  Context context;
  int newValcount=0;
  
  public Custom_row(Context context, int resourceId,
                    List&lt;DataItem&gt; items) {
      super(context, resourceId, items);
      this.context = context;
  }
  private class ViewHolder {
      TextView Items,Cost;
      NumberPicker number;
  
  
  }
  public View getView(int position, View convertView, ViewGroup parent) {
  
      ViewHolder holder = null;
      DataItem dataItem = getItem(position);
      LayoutInflater mInflater = (LayoutInflater) context
              .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      if (convertView == null) {
          convertView = mInflater.inflate(R.layout.activity_custom_row, null);
          holder = new ViewHolder();
          holder.Items = (TextView) convertView.findViewById(R.id.tvItem);
          holder.Cost = (TextView) convertView.findViewById(R.id.tvCost);
          holder.number=(NumberPicker)convertView.findViewById(R.id.numberPicker);
          holder.number.setMaxValue(10);
          holder.number.setMinValue(0);
          holder.number.setValue(0);
          holder.number.setFocusable(false);
          ItemList.picker = holder.number;
          holder.number.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
              @Override
              public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
  
                  if(newVal!=0){
                      newValcount++;
                      if(newValcount &gt; 0)
                          ProPay.setVisibility(View.VISIBLE);
                  }
                  else{
                      newValcount--;
                      if(newValcount==0)
                          ProPay.setVisibility(View.INVISIBLE);
  
                  }
              }
          });
          convertView.setTag(holder);
      }
      else{
          holder = (ViewHolder) convertView.getTag();
      }
      holder.Items.setText(dataItem.getItem());
      holder.Cost.setText(dataItem.getCost());
      return convertView;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>ItemList.java
  `public class ItemList extends Activity {
      public ListView listView;
      public static List dataItems;
      Button PayPro;
      static NumberPicker picker;</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_item_list);
      listView = (ListView)findViewById(R.id.itemList);
      Custom_row.ProPay=(Button)findViewById(R.id.bProPay);
      Custom_row adapter = new Custom_row(this,
              R.layout.activity_custom_row, dataItems);
      listView.setAdapter(adapter);
  }
  }
  </code></pre>
  
  <p>`</p>