2011-09-29 29 views
2

我的数据库有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)); 

    } 

} 

回答

1

显示第二个值从你的类删除static关键字。