I have the problem that when i scrolling down the listview the hidden images shown...how this problem solved...?? Thanks in advance... and this is my code:- @Override public View getView(final int position, View convertView, ViewGroup parent) {
View v = convertView;
if(v==null)
{
LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v=li.inflate(R.layout.custom_row,parent,false);
}
TextView Title = (TextView) v.findViewById(R.id.custom_text);
final RelativeLayout content = (RelativeLayout) v.findViewById(R.id.main);
final ImageView img1 =(ImageView) v.findViewById(R.id.cust_img);
final BinForAll listitem = mList.get(position);
Title.setText(listitem.getTxt());
//Desc.setText(listitem.getDesc());
content.setOnClickListener(new OnClickListener()
{
public void onClick(View arg0)
{
if(img1.getVisibility()==View.VISIBLE && count>=0)
{
count++;
img1.setVisibility(View.GONE);
m1.remove(mList.get(position).getTxt());
Log.d("remove", mList.get(position).getTxt());
}
else if(img1.getVisibility()==View.GONE && count>0)
{
count--;
img1.setVisibility(View.VISIBLE);
m1.add(mList.get(position).getTxt());
Log.d("add", mList.get(position).getTxt());
}
else
{
Toast.makeText(getApplicationContext(), "You can not add more than 10 values..", 1).show();
}
}
});