getFraction

fun TypedArray.getFraction(@StyleableRes index: Int, defaultValue: Float = -1f): Float

Retrieves the fraction at the given index as a Float.