2011-12-06 15 views
2

是否可以從遊標提供表格佈局中的行?如果是,如何?Tablelayout和Cursors

我的光標。

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

回答

2

不久和甜蜜,沒有。你不能在TableLayout

只能在ListView中,微調和GridView使用光標適配器...

+0

基本上用遊標適配器AdapterView的所有子類 – njzk2

+0

謝謝,我會研究gridview。 –