我想在listview中设置imagese,但我没有正确地做到这一点。我不知道的图像有什么问题.plz帮助我,我的代码在这里。
final ArrayList<HashMap<String,String>> dataListfeture = new ArrayList<HashMap<String,String>>();
ArrayList<HashMap<String,String>> dataList = new ArrayList<HashMap<String,String>>();
for(int j=0; j<nodesfeture.getLength(); j++)
{
Element e1 =(Element)nodesfeture.item(j);
Node node = nodesfeture.item(j);
HashMap<String, String> mapfeautre = new HashMap<String, String>();
mapfeautre.put("name",node.getAttributes().getNamedItem("name").getNodeValue());
String rename = mapfeautre.put("name",node.getAttributes().getNamedItem("name").getNodeValue());
rename.replaceAll("", "%20");
mapnamelist= mapfeautre.put("name",node.getAttributes().getNamedItem("name").getNodeValue());
mapfeautre.put("distance",node.getAttributes().getNamedItem("distance").getNodeValue());
mapdistancelist =mapfeautre.put("distance",node.getAttributes().getNamedItem("distance").getNodeValue());
mapfeautre.put("venuetype",node.getAttributes().getNamedItem("venuetype").getNodeValue());
mapvenuelist=mapfeautre.put("venuetype",node.getAttributes().getNamedItem("venuetype").getNodeValue());
mapfeautre.put("imageupload",node.getAttributes().getNamedItem("imageupload").getNodeValue());
String strimageurl=mapfeautre.put("imageupload",node.getAttributes().getNamedItem("imageupload").getNodeValue());
mapimagelist="http://www.afterdarknightlife.com/"+strimageurl;
System.out.println("Image URL "+j+" :"+mapimagelist);
mylistfeature.add(mapfeautre);
}
System.out.println("data list = "+dataListfeture);
ListAdapter adapterfeaturetype = new SimpleAdapter(MainScreen.this, mylistfeature, R.layout.demophoto, new String[]
{
"imageupload","name", "distance","venuetype
},
new int[]
{
R.id.item_featureimage,
R.id.item_featurename,
R.id.item_featuredistance,
R.id.item_featurevenuetype,
});