Frage

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 });
War es hilfreich?

Lösung

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

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top