How To Get Sqlite Db Values In Arraylist To Listview
I need to set adapter values in a listview. In it, I created an ArrayList to get data from SQLite DB and I need to pass it to a listView with 3 columns. Here I mentioned my codes.
Solution 1:
It should be straight forward. Just do:
publicvoidviewAllData( ){
aList = getUserInfo(); //this is where you call the local database.
myAdapter = newSQLCustomViewAllDataAdapter( SQLViewAllData.this,aList);
myListView.setAdapter( myAdapter );
}
Also, make sure you change aList from type SQLPojo to SQLPojo.UserDetails.
Post a Comment for "How To Get Sqlite Db Values In Arraylist To Listview"