2010-09-02 24 views

回答

2

即使API演示樣品也有類似的計劃

Cursor c = getContentResolver().query(Phones.CONTENT_URI, null, null, null, null); 
startManagingCursor(c);    
// Map Cursor columns to views defined in simple_list_item_2.xml 
ListAdapter adapter = new SimpleCursorAdapter(this, 
android.R.layout.simple_list_item_2, c, 
new String[] { Phones.NAME, Phones.NUMBER }, 
new int[] { android.R.id.text1, android.R.id.text2 }); 
setListAdapter(adapter); 
+0

非常感謝..可玉,請給我任何的源代碼? – harish 2010-09-02 06:35:11

+0

我已經附加了一個片段源。在listview中填充它,你應該能夠看到那裏的聯繫人... – DeRagan 2010-09-02 06:51:42

相關問題