當滾動到和我單擊項目列表設置第一個索引它沒有設置。什麼?listview滾動頂部不能設置索引0的
public void onItemClick(AdapterView<?> arg0, View arg1, int index, long arg3) {
// TODO Auto-generated method stub
//ImageView imgNew = (ImageView) arg1.findViewById(R.id.imgIcon);
//imgNew.setImageResource(R.drawable.push);
ImageView imgOld = (ImageView) listView1.getChildAt(0).findViewById(R.id.imgIcon);
imgOld.setImageResource(R.drawable.push);
}
你想要做什麼? – jeet