@ Override protected void onLayout ( boolean changed , int left , int top , int right , int bottom ) { if ( changed || mNeedsResize ) { int widthLimit = ( right - left ) - getCompoundPaddingLeft ( ) - getCompoundPaddingRight ( ) ; int heightLimit = ( bottom - top ) - getCompoundPaddingBottom ( ) - getCompoundPaddingTop ( ) ; resizeText ( widthLimit , heightLimit ) ; } super . onLayout ( changed , left , top , right , bottom ) ; }
Resize text after measuring