0

这是具有 1 对 1 字段映射的代码:

String[] from = new String[]{DbAdapter.KEY_TITLE, 
        DbAdapter.KEY_OPEN_TIME,
        DbAdapter.KEY_FAVORITE};

int[] to = new int[]{R.id.name, R.id.time, R.id.icon};

SimpleCursorAdapter lists = 
    new SimpleCursorAdapter(this, R.layout.row, listsCursor, from, to);

但是我的数据库中有另一个字段 -DbAdapter.KEY_CLOSE_TIME应该R.id.time显示像DbAdapter.KEY_OPEN_TIME + " - " + DbAdapter.KEY_CLOSE_TIME.

我该怎么做?

4

1 回答 1

1

扩展CursorAdapter,您将对视图有更多的控制权。

教程

于 2011-05-21T12:22:50.943 回答