android-components / mozilla.components.support.ktx.android.widget / adjustMaxTextSize

adjustMaxTextSize

fun <ERROR CLASS>.adjustMaxTextSize(heightMeasureSpec: Int, ascenderPadding: Int = DEFAULT_FONT_PADDING): Unit (source)

Adjusts the text size of the TextView according to the height restriction given to the View.MeasureSpec given in the parameter.

This will take TextView.getIncludeFontPadding into account when calculating the available height