title: How to bind live data to array adapter android
body: <p>I have a simple application while I'm trying to understand android/room. I would like to have my query from room to be placed into my list view.</p>
  
  <p>PersonDao.class</p>
  
  <pre><code>@Query("Select name from People limit 3")
  LiveData&lt;List&lt;String&gt;&gt; getThreeNames();
  </code></pre>
  
  <p>AvtivityMain.class</p>
  
  <pre><code>private ArrayAdapter&lt;String&gt; adapter;
  
  private PersonDatabase db;
  private EditText age;
  private EditText name;
  Person person;
  private DatabaseRepository rDb;
  private PersonViewModel personViewModel;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      name = findViewById(R.id.name);
      age = findViewById(R.id.age);
      adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1);
      ListView lvPerson = findViewById(R.id.lv3Poeple);
      lvPerson.setAdapter(adapter);
      personViewModel = ViewModelProviders.of(this).get(PersonViewModel.class);
  
  }
  
  public void addPerson(View view){
      int sAge = Integer.parseInt(age.getText().toString());
      String sName = name.getText().toString();
      person = new Person(sName, sAge);
      personViewModel.insert(person);
      System.out.println(personViewModel.getmAllPeople());
      System.out.println(personViewModel.getm3People());
      //List&lt;String&gt; names = personViewModel.getm3People();
      //adapter.add(personViewModel.getm3People());
  }
  </code></pre>
  
  <p>I have commented out the code I am having problems with. I want to be able to use my query from PersonDao and have my list view show 3 names from my Room database.</p>