내 목록 어댑터를 정의하고 있는데 그 안에 이미지가 표시되거나 값에 따라 보이지 않거나 눈에 띄지 않는 값을 기반으로 숨겨 지도록합니다.사용자 지정 어댑터 내에서 ImageView를 invisable로 설정
여기 내 코드입니다,이 코드는 한 번 INVISIBLE
로 설정 한 후 당신은 결코 VISIBLE
에 다시 read
이미지를 설정하지있는의 getView 방법
singleRow=data.get(position);
readit = singleRow.getRead();
Log.i("readit","" + readit);
//NotificationID=singleRow.getId();
holder.title.setText(singleRow.getAttach_title());
holder.date.setText(singleRow.getAttach_created());
holder.dueDate.setVisibility(ImageView.INVISIBLE);
holder.course.setText(singleRow.getCourse_title());
if(readit==1)
{
//holder.read.setImageResource(IGNORE_ITEM_VIEW_TYPE);
holder.read.setVisibility(ImageView.INVISIBLE);
}
else
{
holder.read.setImageResource(R.drawable.unread);
}
한 가지 더를 해결할 것입니다, 난 그냥 사용할 수 없습니다 setImageResource (1)가 엉망 전체 인터페이스를하기 때문에 –