问题:我有一个ListView,我想做到按一个Button后,把此ListView里某item的属性改变,
请问该怎么做(不使用onItemClick)? 此ListView使用了一个SimpleAdapter.
我试过以下的方法无效,虽然取的到属性值,但无法改变属性值,为何?
View view = Adapter.getView(0, ListView.getChildAt(0), ListView);
ImageView img = (ImageView)view.findViewById(R.id.ID_Image);
int vis = img.getVisibility(); //值正确
img.setVisibility(View.INVISIBLE); //改变此值但无作用
Adapter.notifyDataSetChanged();
//再抓一次值结果还是原本的值 >"<
View view = Adapter.getView(0, ListView.getChildAt(0), ListView);
ImageView img = (ImageView)view.findViewById(R.id.ID_Image);
int v = img.getVisibility();