I am trying to fill up a ListView in Android with a Cursor. For that, I made an object of ArrayAdapter and passed it type as Cursor. I didn’t get the result I wanted. I just want to know that am I doing it correct way or is it wrong? And if its wrong can any one suggest me to do this task. I want to display all the rows in the
Share
You can follow this nice tutorial
Note that you need to pass a
List<YourDataModelClass>toArrayAdapter‘s constructer. (It may simple beList<String>) Here is what I mean:datasource.getAllYourDataModelClass();above is the place where Cursor is saved as aListof class you designed.Hope this helps.