Code example for SparseArray

Methods: append, get

0
		else 
			return mViewCache.removeFirst();
	} 
 
	private View getOrCreateChild(int i) {
		View v = mChildViews.get(i);
		if (v == null) {
			v = mAdapter.getView(i, getCached(), this);
			addAndMeasureChild(i, v);
		} 
		onChildSetup(i, v);
 
		return v;
	} 
 
	private void addAndMeasureChild(int i, View v) {
		LayoutParams params = v.getLayoutParams();
		if (params == null) {
			params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		} 
		addViewInLayout(v, 0, params, true);
		mChildViews.append(i, v); // Record the view against it's adapter index
		measureView(v);
	} 
 
	protected void measureView(View v) {
		// See what size the view wants to be