2

是否可以从游标提供表格布局中的行?如果是,如何?

我的光标。

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 });
4

1 回答 1

2

简而言之,..您不能在 TableLayout 中使用光标适配器

您只能在 ListView、Spinner 和 GridView 中使用光标适配器...

于 2011-12-06T10:45:22.073 回答