Package-level declarations

Functions

Link copied to clipboard
fun TypedArray.getColorExtended(@StyleableRes index: Int, @ColorInt defaultColor: Int = Color.TRANSPARENT): Int

Retrieves the color at the given index.

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

Retrieves the fraction at the given index as a Float.

Link copied to clipboard
fun TypedArray.getNestedTypedArray(context: Context, @StyleableRes resourceId: Int, @StyleableRes styleableResourceId: IntArray): TypedArray

Returns a TypedArray nested inside the receiver TypedArray.

Link copied to clipboard
fun TypedArray.getRawDimension(context: Context, @StyleableRes index: Int, defaultValue: Float): Float

Returns a dimension converted to pixels from a complex unit (such as dp or sp), and divides it by the pixel density of the screen.

Link copied to clipboard

Returns the type of the value at the given index.

Link copied to clipboard

Returns a boolean indicating whether the value at the given index is a fraction.

Link copied to clipboard
inline fun <R> TypedArray.use(block: (TypedArray) -> R): R

Calls the given function block with this TypedArray as its argument, then recycles this TypedArray.