I am having custom listview
with an icon at right end,I have to select multiple items in custom listview
, on selecting items I have to replace that icon with another icons and when I click the replaced icon again I need to get previous icon.
Like This
if (convertView == null){
convertView = mlayoutInflater.inflate(R.layout.custom_list_of_waitlist_providers,null);
tvProviderName = (CustomTextView) convertView.findViewById(R.id.tv_provider_name);
tvProviderSuburb = (CustomTextView) convertView.findViewById(R.id.tv_provider_suburb);
tvProviderCity = (CustomTextView) convertView.findViewById(R.id.tv_provider_city);
tvProviderPostCode = (CustomTextView) convertView.findViewById(R.id.tv_provider_post_code);
icAdd = (ImageButton) convertView.findViewById(R.id.ic_add_provider);
}
s = map.get("providerName");
tvProviderName.setText(s);
tvProviderSuburb.setText(map.get("suburb"));
tvProviderCity.setText(map.get("city"));
tvProviderPostCode.setText(map.get("postCode"));
icAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
icAdd.setImageResource(R.drawable.ic_check);
}
});