Code example for ViewPager.OnPageChangeListener

Methods: getHeight

0
	protected void onLayout(boolean changed, int left, int top, int right,
			int bottom) 
	{ 
		super.onLayout(changed, left, top, right, bottom);
		 
		dy = getHeight() / 2 + 1;
		startX = (getWidth() - (int)(radius + getPaddingLeft() + getPaddingRight() + (pageCount * radius * 3) + (gap * (pageCount-1)))) / 2;
	} 
 
	 
	@Override 
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 
	{ 
		setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec));
	} 
	 
	 
	private int measureWidth(int measureSpec)
	{ 
		int mode = MeasureSpec.getMode(measureSpec);
		int size = MeasureSpec.getSize(measureSpec);