Code example for SparseArray

Methods: clear

0
 
	/** 
	 * Reset the caches associated with the coordinate layouts. 
	 */ 
	static void resetCaches() { 
		mCache.clear();
	} 
 
	/** 
	 * Returns coordinates for elements inside a conversation header view given 
	 * the view width. 
	 */ 
	public static FileListItemCoordinates forWidth(Context context, int width) {
		FileListItemCoordinates coordinates = mCache.get(width);
		if (coordinates == null) {
			coordinates = new FileListItemCoordinates();
			mCache.put(width, coordinates);
			// TODO: make the field computation done inside of the constructor 
			// and mark fields final 
 
			// Layout the appropriate view.