question: private Rect calcBounds ( int index , Paint paint ) { Rect bounds = new Rect ( ) ; CharSequence title = getTitle ( index ) ; bounds . right = ( int ) paint . measureText ( title , 0 , title . length ( ) ) ; bounds . bottom = ( int ) ( paint . descent ( ) - paint . ascent ( ) ) ; return bounds ; }
target:  Calculate the bounds for a view's title