Material Resources
Utility methods to resolve resources for components.
Functions
Link copied to clipboard
open fun getColorStateList(@NonNull context: Context, @NonNull attributes: TypedArray, @StyleableRes index: Int): ColorStateList
Returns the ColorStateList from the given TypedArray attributes.
open fun getColorStateList(@NonNull context: Context, @NonNull attributes: TintTypedArray, @StyleableRes index: Int): ColorStateList
Returns the ColorStateList from the given TintTypedArray attributes.
Link copied to clipboard
open fun getDimensionPixelSize(@NonNull context: Context, @NonNull attributes: TypedArray, @StyleableRes index: Int, defaultValue: Int): Int
Retrieve a dimensional unit attribute at index for use as a size in raw pixels.
Link copied to clipboard
open fun getDrawable(@NonNull context: Context, @NonNull attributes: TypedArray, @StyleableRes index: Int): Drawable
Returns the drawable object from the given attributes.
Link copied to clipboard
Returns the font scale size.
Link copied to clipboard
open fun getTextAppearance(@NonNull context: Context, @NonNull attributes: TypedArray, @StyleableRes index: Int): TextAppearance
Returns a TextAppearanceSpan object from the given attributes.
Link copied to clipboard
Link copied to clipboard
Returns whether the font scale size is at least FONT_SCALE_1_3.
Link copied to clipboard
Returns whether the font scale size is at least FONT_SCALE_2_0.