我的custom listview
右侧有一个图标,我必须在custom listview
中选择多个项目,选择项目我必须用其他图标替换该图标,当我点击替换的图标时再次,我需要获得以前的图标。
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);
}
});