2010-11-25 50 views
0

嗨 我怎麼可以使用自定義列表視圖用的TextView和imageview.i嘗試下面的代碼如何使用自定義列表視圖

ListView lv = (ListView) findViewById(R.id.ListView01); 
    this.getListView().setCacheColorHint(00000000); 
    String[] data = new String[] { "aac", "xsfdf", "dsf", "frgr" }; 
    int[] to = new int[] { R.id.TextView01}; 
    SimpleAdapter adapter = new SimpleAdapter(
      this,null,R.layout.newimage,data, to); 
    setListAdapter(adapter); 

,但它無法正常工作。 幫幫我。 感謝名單

+0

*什麼*不工作? – lbedogni 2010-11-25 08:08:00

回答

0

這不使用自定義列表視圖的方式,這裏u需要創建自定義適配器
請參閱本example

相關問題