TypedArrayKt

public final class TypedArrayKt


Summary

Public methods

static final boolean
TypedArrayKt.getBooleanOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the boolean value for the attribute at index or throws IllegalArgumentException if not defined.

static final @ColorInt int
TypedArrayKt.getColorOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the color value for the attribute at index or throws IllegalArgumentException if not defined.

static final @NonNull ColorStateList
TypedArrayKt.getColorStateListOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the color state list value for the attribute at index or throws IllegalArgumentException if not defined.

static final float
TypedArrayKt.getDimensionOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the dimension value for the attribute at index or throws IllegalArgumentException if not defined.

static final @Dimension int

Retrieve the dimension pixel offset value for the attribute at index or throws IllegalArgumentException if not defined.

static final @Dimension int
TypedArrayKt.getDimensionPixelSizeOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the dimension pixel size value for the attribute at index or throws IllegalArgumentException if not defined.

static final @NonNull Drawable
TypedArrayKt.getDrawableOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the drawable value for the attribute at index or throws IllegalArgumentException if not defined.

static final float
TypedArrayKt.getFloatOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the float value for the attribute at index or throws IllegalArgumentException if not defined.

static final @RequiresApi(value = 26) @NonNull Typeface
TypedArrayKt.getFontOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the font value for the attribute at index or throws IllegalArgumentException if not defined.

static final int

Retrieve the integer value for the attribute at index or throws IllegalArgumentException if not defined.

static final int
TypedArrayKt.getIntegerOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the integer value for the attribute at index or throws IllegalArgumentException if not defined.

static final @AnyRes int
TypedArrayKt.getResourceIdOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieves the resource identifier for the attribute at index or throws IllegalArgumentException if not defined.

static final @NonNull String
TypedArrayKt.getStringOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the string value for the attribute at index or throws IllegalArgumentException if not defined.

static final CharSequence[]
TypedArrayKt.getTextArrayOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the text array value for the attribute at index or throws IllegalArgumentException if not defined.

static final @NonNull CharSequence
TypedArrayKt.getTextOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the text value for the attribute at index or throws IllegalArgumentException if not defined.

static final @NonNull R
<R extends Object> TypedArrayKt.use(
    TypedArray receiver,
    Function1<TypedArray, R> block
)

Executes the given block function on this TypedArray and then recycles it.

Public methods

TypedArrayKt.getBooleanOrThrow

public static final boolean TypedArrayKt.getBooleanOrThrow(
    TypedArray receiver,
    @StyleableRes int index
)

Retrieve the boolean value for the attribute at index or throws IllegalArgumentException if not defined.

See also