title: Trying to display data read from a CSV file in a ListView
body: <p>I am very new to programming in android studio and would like to make an application I can use at work. The basic idea is to import a product list into the application from a CSV file and display it as a list view so I can bring up a related document for each one.</p>
  
  <p>The program reads from the CSV file with no problems but when I try to use an adapter to view the data in a ListView, the adapter always says "Cannot resolve constructor". I have been searching for days to find an answer but I have given up. Can anybody shed some light?</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>    package com.example.mblapplication;
  
      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
      import android.util.Log;
      import android.widget.ArrayAdapter;
      import android.widget.ListView;
  
      import java.io.BufferedReader;
      import java.io.IOException;
      import java.io.InputStream;
      import java.io.InputStreamReader;
      import java.nio.charset.Charset;
      import java.util.ArrayList;
      import java.util.List;
  
      import static com.example.mblapplication.R.id.ProdList1;
  
      public class MainActivity extends AppCompatActivity {
  
      public List&lt;ProdSample&gt; productSamples = new ArrayList&lt;&gt;();
  
      public void readProdData() {
      InputStream is = getResources().openRawResource(R.raw.products);
      BufferedReader reader = new BufferedReader(
              new InputStreamReader(is, Charset.forName("UTF-8"))
      );
      String line = "";
      try {
          // Step over headers
          reader.readLine();
          while ((line = reader.readLine()) != null) {
              Log.d("MBLApplication", "Line is: " + line);
  
              // Split by ","
              String[] tokens = line.split(",");
  
              // Read the data
              ProdSample sample = new ProdSample();
              if (tokens[0].length() &gt; 0) {
                  sample.setSAP(tokens[0]);
              } else {
                  sample.setSAP("");
              }
              sample.setProdID(tokens[1]);
              sample.setWidth(tokens[2]);
              sample.setLooms(tokens[3]);
              productSamples.add(sample);
  
              Log.d("MBLApplication", "Just created: " + sample);
  
          }
      } catch (IOException e) {
          Log.wtf("MBLApplication, Error reading file on line " + line, e);
          e.printStackTrace();
      }
  }
  
  ListView listView;
  //List&lt;String&gt; listItems = new ArrayList&lt;&gt;(5);
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      readProdData();
      ArrayAdapter&lt;String&gt; productAdapter = new ArrayAdapter&lt;String&gt;
              (MainActivity.this, android.R.layout.simple_list_item_1, ProdList1, productSamples); //ERROR HERE
      //listItems.add(0, "Hello");
      //listItems.add(1, "World");
  
      ListView listView = (ListView) findViewById(R.id.ProdList1);
      listView.setAdapter(productAdapter);
        }
      }
  </code></pre>
  
  <p>ProdSample.class</p>
  
  <pre><code>    package com.example.mblapplication;
  
      class ProdSample {
      private String SAP;
      private String ProdID;
      private String Width;
      private String Looms;
  
      public String getSAP() {
      return SAP;
      }
  
      public void setSAP(String SAP) {
      this.SAP = SAP;
      }
  
      public String getProdID() {
      return ProdID;
      }
  
      public void setProdID(String prodID) {
      this.ProdID = prodID;
      }
  
      public String getWidth() {
      return Width;
      }
  
      public void setWidth(String width) {
      this.Width = width;
      }
  
      public String getLooms() {
      return Looms;
      }
  
      public void setLooms(String looms) {
      Looms = looms;
      }
  
      @Override
      public String toString() {
      return "ProdSample{" +
              "SAP='" + SAP + '\'' +
              ", ProdID=" + ProdID +
              ", Width=" + Width +
              ", Looms='" + Looms + '\'' +
              '}';
        }
      }
  </code></pre>