2011-09-29 33 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關鍵字。