Code example for Paint

Methods: getFontMetrics, setTypeface

0
	} 
 
	@Override 
	protected int getSuggestedMinimumHeight() 
	{ 
		paint.setTypeface(Typeface.DEFAULT_BOLD);
		return (int) (-paint.getFontMetrics().top + paint.getFontMetrics().bottom) + getPaddingTop() + getPaddingBottom();
	} 
 
	@Override 
	public void onPageScrolled(final int position, final float positionOffset, final int positionOffsetPixels)
	{ 
		pageOffset = position + positionOffset;
		invalidate();
	} 
 
	@Override 
	public void onPageSelected(final int position)
	{ 
		pagePosition = position;
		invalidate();