当我单击按钮 hide_All_image 或按钮 show_all_image 时,如何在适配器的自定义列表视图中设置所有图像的可见性?
这是我的适配器...
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
View vi=convertView;
if(convertView==null)
vi = inflater.inflate(R.layout.inbox_list_item, null);
final TextView judul = (TextView)vi.findViewById(R.id.judul);
ImageView thumb_image=(ImageView)vi.findViewById(R.id.gambar_tulisan);
HashMap<String, String> tulisan = new HashMap<String, String>();
tulisan = data.get(position);
String varjudul=tulisan.get(FavoriteActivity.TAG_JUDUL);
judul.setText(Html.fromHtml(varjudul));
String gambar_string = tulisan.get(ContentActivity.TAG_GAMBAR);
if (gambar_string.equals("")) {
thumb_image.setVisibility(View.GONE);
} else {
thumb_image.setVisibility(View.VISIBLE);
imageLoader.DisplayImage(tulisan.get(ContentActivity.TAG_GAMBAR_PATH), thumb_image);
}
return vi ;
}
public Set_Visibility_Gone(){
// how the code to setvisibility GONE All thumb_image ?
}
public Set_Visibility_Visible(){
// how the code to setvisibility Visible All thumb_image ?
}
在我点击隐藏所有图片之前
在我点击隐藏所有图像后
谢谢和对不起我的英语。