I am working on a app , in which i require to populate list view from the database. I am getting compatibility issue in following code
dataAdapter = new SimpleCursorAdapter(
this, R.layout.eventlisting,
cursor,
columns,
to,
0);
It requires min api level 11 , mine is 8. Is there any alternative for this to make this code work on api 8 as well. Can i use support library?
Try the SimpleCursorAdapter from the support class. It is used like the API 11+ version and it is already backwards compatible.
You have to download the Support Library , so you only need to change the import Like This way
: