2

Is it possible to feed rows in a tablelayout from cursors? If yes, how?

My cursor.

cursor = db.rawQuery("SELECT _id, countryName , capitalName FROM country WHERE countryName LIKE ?",new String[] { "%" });
adapter = new SimpleCursorAdapter(this, R.layout.capital_list_item,cursor, new String[] { "countryName" , "capitalName"},new int[] { R.id.countryName, R.id.capitalName });
kabuko
  • 36,028
  • 10
  • 80
  • 93
Binoy Babu
  • 16,699
  • 17
  • 91
  • 134

1 Answers1

2

Shortly and sweetly, No.. You can't use Cursor Adapter in TableLayout

You can use Cursor Adapter only in ListView, Spinner and GridView...

user370305
  • 108,599
  • 23
  • 164
  • 151