0
我想在listview中繪製一些單行,但我不知道該怎麼做。我只知道如何改變整個listview的背景。我目前的代碼是這樣的:在ListView中繪製單行
public void paintBackgroundRed(ArrayList<Integer> profileIngList, ArrayList<Integer> productIngList){
ListView lv = (ListView) findViewById(R.id.list_ingredients);
for(int profileIng: profileIngList)
{
if (productIngList.contains(profileIng)){
// paint int profileIng red
}
}
}
我有一個散列圖,所以我可以將該行映射到配置文件成分ID。我如何繪製被評論的行?謝謝。