TypedArrayKt
public final class TypedArrayKt
Summary
Public methods |
|
|---|---|
static final boolean |
getBooleanOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the boolean value for the attribute at |
static final @ColorInt int |
getColorOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the color value for the attribute at |
static final @NonNull ColorStateList |
getColorStateListOrThrow(Retrieve the color state list value for the attribute at |
static final float |
getDimensionOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the dimension value for the attribute at |
static final @Dimension int |
getDimensionPixelOffsetOrThrow(Retrieve the dimension pixel offset value for the attribute at |
static final @Dimension int |
getDimensionPixelSizeOrThrow(Retrieve the dimension pixel size value for the attribute at |
static final @NonNull Drawable |
getDrawableOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the drawable value for the attribute at |
static final float |
getFloatOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the float value for the attribute at |
static final @NonNull Typeface |
@RequiresApi(value = 26)Retrieve the font value for the attribute at |
static final int |
getIntOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the integer value for the attribute at |
static final int |
getIntegerOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the integer value for the attribute at |
static final @AnyRes int |
getResourceIdOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieves the resource identifier for the attribute at |
static final @NonNull String |
getStringOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the string value for the attribute at |
static final @NonNull CharSequence[] |
getTextArrayOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the text array value for the attribute at |
static final @NonNull CharSequence |
getTextOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)Retrieve the text value for the attribute at |
static final @NonNull R |
<R extends Object> use(Executes the given |
Public methods
getBooleanOrThrow
public static final boolean 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 |
getColorOrThrow
public static final @ColorInt int getColorOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the color value for the attribute at index or throws IllegalArgumentException if not defined.
getColorStateListOrThrow
public static final @NonNull ColorStateList getColorStateListOrThrow(
@NonNull TypedArray receiver,
@StyleableRes int index
)
Retrieve the color state list value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getColorStateList |
getDimensionOrThrow
public static final float getDimensionOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the dimension value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getDimension |
getDimensionPixelOffsetOrThrow
public static final @Dimension int getDimensionPixelOffsetOrThrow(
@NonNull TypedArray receiver,
@StyleableRes int index
)
Retrieve the dimension pixel offset value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getDimensionPixelOffset |
getDimensionPixelSizeOrThrow
public static final @Dimension int getDimensionPixelSizeOrThrow(
@NonNull TypedArray receiver,
@StyleableRes int index
)
Retrieve the dimension pixel size value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getDimensionPixelSize |
getDrawableOrThrow
public static final @NonNull Drawable getDrawableOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the drawable value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getDrawable |
getFloatOrThrow
public static final float getFloatOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the float value for the attribute at index or throws IllegalArgumentException if not defined.
getFontOrThrow
@RequiresApi(value = 26)
public static final @NonNull Typeface getFontOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the font value for the attribute at index or throws IllegalArgumentException if not defined.
getIntOrThrow
public static final int getIntOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the integer value for the attribute at index or throws IllegalArgumentException if not defined.
getIntegerOrThrow
public static final int 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 |
getResourceIdOrThrow
public static final @AnyRes int getResourceIdOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieves the resource identifier for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getResourceId |
getStringOrThrow
public static final @NonNull String getStringOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the string value for the attribute at index or throws IllegalArgumentException if not defined.
getTextArrayOrThrow
public static final @NonNull CharSequence[] getTextArrayOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the text array value for the attribute at index or throws IllegalArgumentException if not defined.
| See also | |
|---|---|
hasValue |
|
getTextArray |
getTextOrThrow
public static final @NonNull CharSequence getTextOrThrow(@NonNull TypedArray receiver, @StyleableRes int index)
Retrieve the text value for the attribute at index or throws IllegalArgumentException if not defined.