Code example for Adapter

Methods: getCount

0
			getViewTreeObserver().addOnGlobalLayoutListener(orientationChangeListener);
		} 
	} 
 
	public int getViewsCount() { 
		return mAdapter.getCount();
	} 
 
	@Override 
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		int widthSize = MeasureSpec.getSize(widthMeasureSpec);
		int heightSize = MeasureSpec.getSize(heightMeasureSpec);
		final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
		final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
 
		int childWidth = 0;
		int childHeight = 0;
		int childState = 0;
 
		final int widthPadding = getWidthPadding();
		final int heightPadding = getHeightPadding();