title: Duplicate data in ListView?
body: <p>I have a <code>ListView</code> that fill from <code>Sqlite</code> . But when I fill the <code>ListView</code> I see Duplicate Data.</p>
  
  <p>My <code>Struct.class</code> :</p>
  
  <pre><code>public class Struct{
      public String IdS;
      public String NameS;
      public String Group;
  }
  </code></pre>
  
  <p>My <code>Activity.class</code> :</p>
  
  <pre><code>ArrayAdapter adapter = new AdapterPSK(MPSK, activity, width, context);
          ListView lstPa = (ListView) findViewById(R.id.lstPasokhgoo);
          lstPa.setAdapter(adapter);
  
                  Struct stp = new Struct();
                  cursor_Sharee = sql.rawQuery("SELECT ID_P,Name_P,Group_P FROM ChatPasokhgo_tbl where Group_P = '" + "LOL" + "'", null);
                  try {
                      if (cursor_Sharee != null) {
                          if (cursor_Sharee.moveToFirst()) {
                              do {
                                  stp.IdS = cursor_Sharee.getString(cursor_Sharee.getColumnIndex("ID_P"));
                                  stp.NameS = cursor_Sharee.getString(cursor_Sharee.getColumnIndex("Name_P"));
                                  stp.Group = cursor_Sharee.getString(cursor_Sharee.getColumnIndex("Group_P"));
                                  MPSK.add(stp);
                              } while (cursor_Sharee.moveToNext());
                          }
                      }
                  } catch (Exception e) {
                      // TODO: handle exception
                  }finally{
                      cursor_Sharee.close();
                  }
                  adapter.notifyDataSetChanged();
  </code></pre>
  
  <p><code>MPSK</code> is:</p>
  
  <pre><code>public ArrayList&lt;Struct&gt; MPSK = new ArrayList&lt;Struct&gt;();
  </code></pre>
  
  <p>My <code>AdapterPSK.class</code> :</p>
  
  <pre><code>public class AdapterPSK extends ArrayAdapter&lt;Struct&gt; {
      static boolean enable = true;
      static Activity activity;
      static int widths;
      public AdapterPSK(ArrayList&lt;Struct&gt; array,Activity act,int WIDTH,Context context) {
          super(context, R.layout.chat_page, array);
          activity = act;
          widths = WIDTH;
      }
  
          public ViewHolder(View view)
          {
              txtName = (TextView) view.findViewById(R.id.txtname);
              layoutRoot = (ViewGroup) view.findViewById(R.id.layoutRoot);
              txtname = (TextView) view.findViewById(R.id.txtname);
          }
          public void fill(ArrayAdapter&lt;Struct&gt; arrayAdapter,final Struct item , int position)
          {
              MarginLayoutParams txtN = (MarginLayoutParams) txtname.getLayoutParams();
              txtN.rightMargin = MarginRight;
              txtname.setTextSize(TextSize);
  
              if (item.NameS != null) {
                  txtName.setText(item.NameS);
              }else if(item.NameE != null){
                  txtName.setText(item.NameE);
              }
  
          }
      }
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          ViewHolder holder;
          Struct item = getItem(position);
          if(convertView == null)
          {
              convertView = G.inflater.inflate(R.layout.adapter_pasokhgoo,parent,false);
              holder = new ViewHolder(convertView);
              convertView.setTag(holder);
          }else {
              holder = (ViewHolder) convertView.getTag();
          }
          holder.fill(this, item, position);
          return convertView;
      }
  </code></pre>
  
  <p>Notice : <code>ListView</code> show me last row of sqlite . But when I get <code>Log</code> see all of fetching data .My <code>Query</code> is true .  My bug is from MPSK .</p>