2010-06-07 32 views
0

我有這樣的代碼:Android:如何爲SimpleCursorAdapter創建onclick事件?

db=(new DatabaseHelper(this)).getWritableDatabase(); 
    constantsCursor=db.rawQuery("SELECT _ID, title, subtitle, image "+ 
                  "FROM news ORDER BY title", 
                  null); 

    ListAdapter adapter=new SimpleCursorAdapter(this, 
               R.layout.row, constantsCursor, 
               new String[] {"title", "subtitle", "image"}, 
               new int[] {R.id.value, R.id.title, R.id.icon}); 

    setListAdapter(adapter); 
    registerForContextMenu(getListView()); 

該款顯示器的標題列表。但我不知道如何創建一個點擊事件,以便我可以調用另一個視圖,當我點擊該列表中的一個項目時。

有人嗎?

回答