title: ArrayAdapter:you must supply a resource id for a textview
body: <p>i have an app in which i want to fill the ListView by data from SQLite Database...in this part i have an problem, with arrayAdapter...</p>
  
  <p>here is my code of the method for fill the listView:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_list);
      PetListView = (ListView)findViewById(R.id.list);
  
  
      MyDatabaseHelper db = new MyDatabaseHelper(this);
      String [] items = new String[100];
  
  
      List&lt;Pet&gt; pets = db.getAllPets();
      for (int i = 0; i &lt; 10; i++) {
          items[i] = pets.get(i).getName();                   
      }
  
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.activity_list_item, R.id.textView1list, items);
      PetListView.setAdapter(adapter);
  
  }
  </code></pre>
  
  <p>and this is method implemented in my database helper:</p>
  
  <pre><code>public List&lt;Pet&gt; getAllPets() {
      List&lt;Pet&gt; petList = new ArrayList&lt;Pet&gt;();
      String selectQuery = "SELECT * FROM " + TABLE_PETS;
  
      SQLiteDatabase db = this.getWritableDatabase();
      Cursor cursor = db.rawQuery(selectQuery, null);
  
      if (cursor.moveToFirst()) {
          do {
              Pet pet = new Pet();
              pet.setID(Integer.parseInt(cursor.getString(0)));
              pet.setName(cursor.getString(1));
              pet.setAge(cursor.getString(2));
              petList.add(pet);
          } while (cursor.moveToNext());
      }
      cursor.close();
      return petList;     
  }
  </code></pre>
  
  <p>Why textView? I'm only using ListView...</p>
  
  <p>Can you anybody tell me any other way how to fill the listView by data(names) from SQLite?</p>