我想在一行中添加一张图片ListView
,这是我的代码:
ListView listViewProducts = (ListView) findViewById(R.id.listViewProducts);
ImageView iconMeat = (ImageView) findViewById(R.id.iconMeat);
String[] products = getResources().getStringArray(R.array.products);
for (int itemPos = 0; itemPos < listViewProducts.getCount(); itemPos++)
{
if ( products[0].equals(listViewProducts.getItemAtPosition(itemPos)) )
{
//TODO
// In this case to add the image
}
}
谢谢