Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

androidx.core.content.res

Classes

ConfigurationHelper

Helper class which allows access to properties of Configuration in a backward compatible fashion.

ResourcesCompat

Helper for accessing features in android.content.res.Resources.

Extension functions summary

For android.content.res.TypedArray
Boolean
TypedArray.getBooleanOrThrow(@StyleableRes index: Int)

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

Int
TypedArray.getColorOrThrow(@StyleableRes index: Int)

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

ColorStateList
TypedArray.getColorStateListOrThrow(@StyleableRes index: Int)

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

Float
TypedArray.getDimensionOrThrow(@StyleableRes index: Int)

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

Int

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

Int

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

Drawable
TypedArray.getDrawableOrThrow(@StyleableRes index: Int)

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

Float
TypedArray.getFloatOrThrow(@StyleableRes index: Int)

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

Typeface
TypedArray.getFontOrThrow(@StyleableRes index: Int)

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

Int
TypedArray.getIntOrThrow(@StyleableRes index: Int)

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

Int
TypedArray.getIntegerOrThrow(@StyleableRes index: Int)

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

Int
TypedArray.getResourceIdOrThrow(@StyleableRes index: Int)

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

String
TypedArray.getStringOrThrow(@StyleableRes index: Int)

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

Array<CharSequence>
TypedArray.getTextArrayOrThrow(@StyleableRes index: Int)

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

CharSequence
TypedArray.getTextOrThrow(@StyleableRes index: Int)

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

R
TypedArray.use(block: (TypedArray) -> R)

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

Extension functions

getBooleanOrThrow

fun TypedArray.getBooleanOrThrow(@StyleableRes index: Int): Boolean

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

getColorOrThrow