title: Listview doesn't gives correct values
body: <p>I'm getting wrong values from the Listview after clicking on it.</p>
  
  <p><strong>Flow:</strong></p>
  
  <p>a)I have a Spinner once Spinner selected the Listview values gets changed using the help of an Asynctask.</p>
  
  <p>OnPostMethod Method of Asynctask to load items in the Listview</p>
  
  <pre><code>protected void onPostExecute(List&lt;MIC_OrderDetails&gt; lst) {
              dialog.setMessage("Inflating Data...");
  
              if (lst.get(lst.size() - 1).getResult().contains(("success"))) {
  
                  ordList.addAll(lst);
                  ordList.notifyDataSetChanged();
                  dialog.dismiss();
  
                  /*
                   * ordList = new MicListAdapter(InventoryCount.this, lst);
                   * lstView.setAdapter(ordList);
                   * 
                   * dialog.dismiss();
                   */
  
              } else {
                  dialog.dismiss();
                  toastText.setText("Problem in loading Items");
                  Toast toast = new Toast(getApplicationContext());
                  toast.setGravity(Gravity.CENTER_VERTICAL, 0, 410);
                  toast.setDuration(Toast.LENGTH_LONG);
                  toast.setView(toastLayout);
                  toast.show();
              }
          }
  </code></pre>
  
  <p>In My Adapter MicListAdapter i have created addAll() method since direct invocation doesn't work for me</p>
  
  <pre><code>public void addAll(List&lt;MIC_OrderDetails&gt; lst) {
          this.alllst.clear();
          this.alllst.addAll(lst);
          this.notifyDataSetChanged();
      }
  </code></pre>
  
  <p>b)OnClicking the Listview the values corresponds to it doesn't comes in my Custom Dialog box ie</p>
  
  <p>Suppose my Spinner contains two values(1 &amp; 2).By default at the first time 1 will be shown in the Spinner when i changed it to 2 the Listview values gets affected that corresponds to "2" but when i clicked on the Listview the values that i got belongd to "1".</p>
  
  <p>Here is the code snippet for Listview onclick </p>
  
  <pre><code>    lstView.setOnItemClickListener(new OnItemClickListener() {
      @Override
                      public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                              int position, long arg3) {
  
  MIC_OrderDetails list_obj = new MIC_OrderDetails();
                      list_obj = (MIC_OrderDetails) lstView
                              .getItemAtPosition(position);
  
                      ItemNo = list_obj.getItemNumber();
                      Desc = list_obj.getItemDescription();
                      PickSeq = list_obj.getPickSeq();
                      StockUnit = list_obj.getUnit();
                      qtyonHand = list_obj.getQtyonHand();// This value gives
                                                          // QOHand
                      qtyCount = list_obj.getQtyCount();
                      loc = mspinner.getItemAtPosition(
                              mspinner.getSelectedItemPosition()).toString();
  
                      medtItem.setText(ItemNo);
                      medtdesc.setText(Desc);
  
                      qtyCount = supporter.getCurrencyFormat(Double
                              .parseDouble(qtyCount));
  
                      medtQtyCount.setText(qtyCount);
                      medtuom.setText(StockUnit);
                      medtQtyCountTotal.setText(qtyCount);
  .....
  });
  </code></pre>
  
  <p>This is my full adapter class.</p>
  
  <pre><code>public class MicListAdapter extends ArrayAdapter&lt;MIC_OrderDetails&gt; implements
      Filterable {
  
  List&lt;MIC_OrderDetails&gt; alllst;
  List&lt;MIC_OrderDetails&gt; list;
  
  List&lt;MIC_OrderDetails&gt; filterlst;
  // = new ArrayList&lt;MIC_OrderDetails&gt;();
  Context context;
  
  TextView txtitem;
  TextView txtdesc;
  TextView txtpick;
  TextView txtQtyonHand;
  TextView txtQtyCounted;
  TextView txtuom;
  /* TextView txtstatus; */
  
  private ModelFilter filter;
  
  @Override
  public Filter getFilter() {
      if (filter == null) {
          filter = new ModelFilter();
      }
      return filter;
  }
  
  public MicListAdapter(Context context, List&lt;MIC_OrderDetails&gt; value) {
      // TODO Auto-generated constructor stub
      super(context, R.layout.six_textview, value);
      this.context = context;
      this.list = value;
      this.alllst = new ArrayList&lt;MIC_OrderDetails&gt;(list);
      this.filterlst = new ArrayList&lt;MIC_OrderDetails&gt;(alllst);
      getFilter();
  }
  
  public void addAll(List&lt;MIC_OrderDetails&gt; lst) {
      this.alllst.clear();
      this.alllst.addAll(lst);
      this.notifyDataSetChanged();
  }
  
  @Override
  public int getCount() {
      // TODO Auto-generated method stub
      return alllst.size();
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
  
      final int pos = position;
  
      View view = null;
      if (convertView == null) {
  
          convertView = LayoutInflater.from(getContext()).inflate(
                  R.layout.six_textview, parent, false);
  
          txtitem = (TextView) convertView.findViewById(R.id.txt_fullItemNo);
          txtdesc = (TextView) convertView.findViewById(R.id.txt_fullDesc);
          txtpick = (TextView) convertView.findViewById(R.id.txt_fullLoc);
          txtQtyonHand = (TextView) convertView
                  .findViewById(R.id.txt_fullord);
          txtQtyCounted = (TextView) convertView
                  .findViewById(R.id.txt_fullrecqty);
          txtuom = (TextView) convertView.findViewById(R.id.txt_fullUom);
          convertView.setTag(new OrdersViewHolder(txtitem, txtdesc, txtpick,
                  txtQtyonHand, txtQtyCounted, txtuom));
  
      } else {
          OrdersViewHolder viewHolder = (OrdersViewHolder) convertView
                  .getTag();
      }
  
      OrdersViewHolder holder = (OrdersViewHolder) convertView.getTag();
  
      holder.txtitem.setText(alllst.get(position).getItemNumber());
      holder.txtdesc.setText(alllst.get(position).getItemDescription());
      holder.txtpick.setText(alllst.get(position).getPickSeq());
      holder.txtQtyonHand.setText((alllst.get(position).getQtyonHand()));
      /*
       * String o=(lst.get(position).getQtyShiped()).toString(); String
       * u=lst.get(position).getUom();
       */
      holder.txtQtyCounted.setText((alllst.get(position).getQtyCount()));
      holder.txtuom.setText(alllst.get(position).getUnit());
      /* holder.txtstatus.setText(alllst.get(position).getStatus()); */
  
      return convertView;
  
  }
  
  /** Holds child views for one row. */
  static class OrdersViewHolder {
  
      TextView txtitem;
      TextView txtdesc;
      TextView txtpick;
      TextView txtQtyonHand;
      TextView txtQtyCounted;
      TextView txtuom;
  
      /* TextView txtstatus; */
  
      public OrdersViewHolder(TextView txtitem, TextView txtdesc,
              TextView txtpick, TextView txtQtyonHand,
              TextView txtQtyCounted, TextView txtuom) {
          // TODO Auto-generated constructor stub
          this.txtitem = txtitem;
          this.txtdesc = txtdesc;
          this.txtpick = txtpick;
          this.txtQtyonHand = txtQtyonHand;
          this.txtQtyCounted = txtQtyCounted;
          this.txtuom = txtuom;
          /* this.txtstatus=txtstatus; */
  
      }
  </code></pre>
  
  <p>Can anyone please tell me why this scenario occurs for me...Thanks in advance</p>