getFloat

fun Context.getFloat(@DimenRes id: Int, default: Float): Float


Extension function to get a float value from a dimension resource. Returns true if the resource is a float type, and fills out with the value.


fun View.getFloat(@DimenRes id: Int, default: Float): Float

Extension function to get a float value from a dimension resource, or a default if not a float.