如何增加光标值?

时间:2011-09-29 10:55:00

标签: android

我的数据库有12个值我使用表格布局和列表视图但在第二行它再次开始显示来自数据库的第二个值

 class NoteHolder {
    private Button b1 = null;
    private Button b2 = null;
    private Button b3 = null;


    NoteHolder(View row) {
        b1 = (Button) row.findViewById(R.id.one);
        b2 = (Button) row.findViewById(R.id.two);
        b3 = (Button) row.findViewById(R.id.three);

    }

    void populateFrom(Cursor c, NoteHelper helper) {
        b1.setText(helper.getNote(c));
            c.moveToNext();
        b2.setText(helper.getNote(c));
        c.moveToNext();
        b3.setText(helper.getNote(c));

    }

}

2 个答案:

答案 0 :(得分:1)

从您的班级中删除静态关键字。

答案 1 :(得分:1)