Code example for SparseIntArray

Methods: clear

0
   * 
   * @return this adapter 
   */ 
  public MultiTypeAdapter clear() { 
    items.clear();
    types.clear();
 
    notifyDataSetChanged(); 
    return this;
  } 
 
  /** 
   * Add item to adapter registered as the given type 
   * 
   * @param type 
   * @param item 
   * @return this adapter 
   */ 
  public MultiTypeAdapter addItem(int type, Object item) {
    types.put(items.size(), type);
    items.add(item);