Code example for WeakHashMap

Methods: putremove

0
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) {
		final int viewType = getItemViewType(position);
 
		if (viewType == headerViewType) {
			headers.remove(convertView);
			convertView = delegate.getHeaderView(
					translateListViewPosition(position), convertView, parent);
			headers.put(convertView, null);
		} else if (viewType == dividerViewType) {
			if (convertView == null) {
				convertView = makeDivider();
			} 
			return convertView;
		} else { 
			convertView = delegate.getView(translateListViewPosition(position),
					convertView, parent);
		} 
 
		return convertView;
	}