ListView From Sqlite in android

前端 未结 4 2008
天命终不由人
天命终不由人 2020-12-19 16:53

As I searched whole net still in problem with ListView From Sqlite. After searching so much i am trying my project on android hive example Link here. So in this in Database

4条回答
  •  情歌与酒
    2020-12-19 17:17

    Try to bind the data into the listview as below:

    List contact = new ArrayList(); 
    contact=getAllContacts();     
    ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, contact); 
     listContent.setAdapter(adapter);
    

提交回复
热议问题