Home > DeveloperSection > Interviews > What is cursor Adapters in Android

Posted on    January-11-2016 10:36 PM

 Android Android  Android Listview 
 1 Answer(s)
  452  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    January-11-2016 11:36 PM

Android provides adapter classes specifically to display data from an SQLite database query. There is SimpleCursorAdapter class, which is more simpler and you cannot use your own custom xml layout and you don't have the control of the layout. In order to use custom xml layout, Android provides CursorAdapter.

A CursorAdapter makes it easy to use when the resource of a listview is coming from database and you can have more control over the binding of data values to layout controls. In the newView() method, you simply inflate the view and return it. In the bindView() method, you set the elements of your view.

Don't want to miss updates? Please click the below button!

Follow MindStick