private void initTextTimeWidth() {
        mTimeTextWidth = 0;
        for (int i = 0; i < 24; i++) {
            // Measure time string and get max width.
            String time = getDateTimeInterpreter().interpretTime(i);
            if (time == null)
                throw new IllegalStateException("A DateTimeInterpreter must not return null time");
            mTimeTextWidth = Math.max(mTimeTextWidth, mTimeTextPaint.measureText(time));
        }
    }
private void initTextTimeWidth ( ) { mTimeTextWidth = 0 ; for ( int i = 0 ; i < 24 ; i ++ ) { String time = getDateTimeInterpreter ( ) . interpretTime ( i ) ; if ( time == null ) throw new IllegalStateException ( "A DateTimeInterpreter must not return null time" ) ; mTimeTextWidth = Math . max ( mTimeTextWidth , mTimeTextPaint . measureText ( time ) ) ; } }
Initialize time column width. Calculate value with all possible hours (supposed widest text).