我在我的代码中遇到问题...我想从自定义列表视图中设置 Visibility Gone all Image...我试过但不工作:(
这是我的代码...
@Override
public void onResume() {
super.onResume();
DatabaseHandler database = new DatabaseHandler(getApplicationContext());
List<Setting_App> isisetting_appListSqllite = database.getSettingApp("Hide Image");
String hide_image;
if(isisetting_appListSqllite.size()>0){
Setting_App s = isisetting_appListSqllite.get(0);
hide_image = s.getIsiSettingApp();
}
else{
hide_image="N";
}
int count_list_adapter=list.getAdapter().getCount()-2;
if(adapter!=null){
for(int i=2; i < count_list_adapter; i++){
ImageView thumb_image= (ImageView)list.getAdapter().getView(i, null, null).
findViewById(R.id.image_tulisan);
if(hide_image.equals("Y")){
thumb_image.setVisibility(View.GONE);
}
else{
thumb_image.setVisibility(View.VISIBLE);
}
adapter.notifyDataSetChanged();
}
}
}
如何解决?感谢您的参与...对不起我的英语...