Code example for SparseArray

Methods: append

0
		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);
		measureView(v);
	} 
 
	private void measureView(final View v) {
		v.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
		float scale = Math.min((float) getWidth() / (float) v.getMeasuredWidth(), (float) getHeight() / (float) v.getMeasuredHeight());
		v.measure(View.MeasureSpec.EXACTLY | (int) (v.getMeasuredWidth() * scale * mScale),
				View.MeasureSpec.EXACTLY | (int) (v.getMeasuredHeight() * scale * mScale));
	} 
 
	private Rect getScrollBounds(final int left, final int top, final int right, final int bottom) {
		int xmin = getWidth() - right;
		int xmax = -left;
		int ymin = getHeight() - bottom;
Connect your IDE to all the code out there  Get Codota for Java