Code example for SparseIntArray

Methods: append, get, size

0
	 
	public void addItem(MultiItem item) {
		int resource = item.getLayoutResource();
		 
		if (resource != IGNORE_ITEM_VIEW_TYPE) {
			if (viewTypes.get(resource, NO_SUCH_ITEM) == NO_SUCH_ITEM) {
				// Resource not already added, add it 
				viewTypes.append(resource, viewTypes.size());
			} 
		} 
		 
		listItems.add(item);
	} 
	 
	public void clear() { 
		listItems.clear();
	} 
	 
	@Override 
	public boolean areAllItemsEnabled() { 
		return false;