TypedArrayKt

public final class TypedArrayKt


Summary

Public methods

static final boolean
TypedArrayKt.getBooleanOrThrow(
    @NonNull 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(
    @NonNull 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(
    @NonNull 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(
    @NonNull 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

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

static final @NonNull Drawable
TypedArrayKt.getDrawableOrThrow(
    @NonNull 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(
    @NonNull 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(
    @NonNull TypedArray receiver,
    @StyleableRes int index
)

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

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

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

static final int
TypedArrayKt.getIntegerOrThrow(
    @NonNull 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(
    @NonNull 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(
    @NonNull TypedArray receiver,
    @StyleableRes int index
)

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

static final @NonNull Array<@NonNull CharSequence>
TypedArrayKt.getTextArrayOrThrow(
    @NonNull 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(
    @NonNull 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(
    @NonNull TypedArray receiver,
    @NonNull Function1<@NonNull TypedArray, @NonNull R> block
)

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

Public methods

TypedArrayKt.getBooleanOrThrow

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

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

See also
hasValue
getBoolean

TypedArrayKt.getColorOrThrow

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

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

See also
hasValue
getColor

TypedArrayKt.getColorStateListOrThrow

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

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

TypedArrayKt.getDimensionOrThrow

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

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

TypedArrayKt.getDimensionPixelOffsetOrThrow

@Dimension
@NonNull
public static final @Dimension int TypedArrayKt.getDimensionPixelOffsetOrThrow(
    @NonNull TypedArray receiver,
    @StyleableRes int index
)

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

TypedArrayKt.getDimensionPixelSizeOrThrow

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

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

TypedArrayKt.getDrawableOrThrow

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

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

TypedArrayKt.getFloatOrThrow

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

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

See also
hasValue
getFloat

TypedArrayKt.getFontOrThrow

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

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

See also
hasValue
getFont

TypedArrayKt.getIntOrThrow

@NonNull
public static final int TypedArrayKt.getIntOrThrow(
    @NonNull TypedArray receiver,
    @StyleableRes int index
)

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

See also
hasValue
getInt

TypedArrayKt.getIntegerOrThrow

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

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

See also
hasValue
getInteger

TypedArrayKt.getResourceIdOrThrow

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

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

TypedArrayKt.getStringOrThrow

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

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

See also
hasValue
getString

TypedArrayKt.getTextArrayOrThrow

@NonNull
public static final Array<@NonNull CharSequenceTypedArrayKt.getTextArrayOrThrow(
    @NonNull TypedArray receiver,
    @StyleableRes int index
)

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

TypedArrayKt.getTextOrThrow

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

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

See also
hasValue
getText

TypedArrayKt.use

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

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

See also
use