title: Showing List<object> in listView
body: <p>Sorry for my bad english.this is part of a data base that show in a listview names of clients of a store.I have the following code:</p>
  
  <pre><code>private void updateCustomerList(){
          mdatabase=new MiDataBase(mcontext);
          customerList=new ArrayList&lt;Customer&gt;();
          customerList=mdatabase.getallCustomer();//this call getallCustumer
          customerListStr=new ArrayList&lt;String&gt;();
          mlistView=getListView();
          if(customerList==null||customerList.size()&lt;=0){
              customerListStr.add("NO SE HAN AÑADIDO CLIENTES");
              unregisterForContextMenu(mlistView);
          }else{
              Customer item=new Customer();
              for(int i=0;i&lt;customerList.size();i++){
                  item=customerList.get(i);
                  customerListStr.add(item.getName());
              }
              registerForContextMenu(mlistView);
          }
          MyArrayAdapter marrayAdapter=new MyArrayAdapter(mcontext,customerListStr);
          mlistView.setAdapter(marrayAdapter);
      }
  </code></pre>
  
  <p>Method getallCustomer is:</p>
  
  <pre><code>public List&lt;Customer&gt;getallCustomer(){
  
      ArrayList&lt;String&gt;marrayList=new ArrayList&lt;String&gt;();
      List&lt;Customer&gt; mcustomerList=new ArrayList&lt;Customer&gt;();
      marrayList.add(Customer.camposCust.name.toString());
      Customer mcustumer=new Customer();
      String[]marrayColumn=marrayList.toArray(new String[marrayList.size()]);
      Cursor mcursor;
      openDB();
      mcursor=database.query(nombreT,marrayColumn,null,null,null,null,null);
      mcursor.moveToFirst();
      int mindex=mcursor.getColumnIndex(Customer.camposCust.name.toString());
      while(mcursor.isAfterLast()==false){
          mcustumer.setName(mcursor.getString(mindex));
          mcustomerList.add(mcustumer);
          mcursor.moveToNext();
      }
      mcursor.close();
      closeDB();
      return mcustomerList;
  }
  </code></pre>
  
  <p>and the Customer class is:</p>
  
  <pre><code>public class Customer
  {
      private String city;
      private String address;
      private String cel;
      private String email;
      private String name;
      private int customerID;
  
      public enum camposCust{
          city,
          address,
          cel,
          email,
          name,
          _customerID
      }
      public void setCity(String city)
      {
          this.city = city;
      }
  
      public String getCity()
      {
          return city;
      }
  
      public void setAddress(String address)
      {
          this.address = address;
      }
  
      public String getAddress()
      {
          return address;
      }
  
      public void setCel(String cel)
      {
          this.cel = cel;
      }
  
      public String getCel()
      {
          return cel;
      }
  
      public void setEmail(String email)
      {
          this.email = email;
      }
      public String getEmail()
      {
          return email;
      }
  
      public void setName(String name)
      {
          this.name = name;
      }
  
      public String getName()
      {
          return name;
      }
      public void setCustomerID(int customerID)
      {
          this.customerID = customerID;
      }
  
      public int getCustomerID()
      {
          return customerID;
      }
  }
  </code></pre>
  
  <p>the problem is when I introduce two or more items, in the listview just show the last item introduced more than once,like the following picture:for example I introduced three items:Juan, Peter and Joseph. Juan and Peter doesn't show</p>
  
  <p><a href="https://i.stack.imgur.com/eLVTN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eLVTN.png" alt="enter image description here"></a></p>
  
  <p>I hope you understand and someone can helpe please. I will appreciate, thanks in advance.</p>