2010-04-22 21 views
0

我正在查找如何將圖像分配給可擴展列表的每個子項中的imageview。將imageview添加到可擴展列表查詢中的子元素

如果任何人有任何信息或鏈接,以瞭解如何做到這一點,我會非常感激。

expListAdapter = 
      new SimpleExpandableListAdapter( 
       main.this, 
       createGroupList(), 
       R.layout.parentnode, 
       new String[] { "day", "number" }, 
       new int[] { R.id.TextView01, R.id.TextView02 }, 
       createChildList(), 
       R.layout.child_row, 
       new String[] { "image", "childName", "date"}, 
       new int[] { R.id.ImageView01, R.id.childname, R.id.date } 
      ); 
     setListAdapter(expListAdapter); 

是我的適配器在這一刻看起來像什麼,我在自定義適配器,所以我不知道從哪裏開始。

任何幫助將是巨大的:d

回答

0

您將需要擴展適配器類並覆蓋getView方法。 在其中,您可以使用Cursor查詢的結果修改任何字段。