Code example for SparseArray

Methods: append

		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
	private void measureView(View v) {
		// See what size the view wants to be 
		v.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
		if (!mReflow) {
		// Work out a scale that will fit it to this view 
		float scale = Math.min((float)getWidth()/(float)v.getMeasuredWidth(),
		// Use the fitting values scaled by our current scale factor 
		v.measure(View.MeasureSpec.EXACTLY | (int)(v.getMeasuredWidth()*scale*mScale),
				View.MeasureSpec.EXACTLY | (int)(v.getMeasuredHeight()*scale*mScale));