ResourcesCompat
Helper for accessing features in Resources.
Types
Link copied to clipboard
Interface used to receive asynchronous font fetching events.
Link copied to clipboard
class ThemeCompat
Provides backward-compatible implementations for new Theme APIs.
Functions
Link copied to clipboard
Clears cached values associated with the specified Theme.
Link copied to clipboard
Link copied to clipboard
open fun getColorStateList(@NonNull res: Resources, @ColorRes id: Int, @Nullable theme: Resources.Theme): ColorStateList
Returns a themed color state list associated with a particular resource ID.
Link copied to clipboard
open fun getDrawable(@NonNull res: Resources, @DrawableRes id: Int, @Nullable theme: Resources.Theme): Drawable
Return a drawable object associated with a particular resource ID and styled for the specified theme.
Link copied to clipboard
open fun getDrawableForDensity(@NonNull res: Resources, @DrawableRes id: Int, density: Int, @Nullable theme: Resources.Theme): Drawable
Return a drawable object associated with a particular resource ID for the given screen density in DPI and styled for the specified theme.
Link copied to clipboard
Returns a font Typeface associated with a particular resource ID.
open fun getFont(@NonNull context: Context, @FontRes id: Int, @NonNull fontCallback: ResourcesCompat.FontCallback, @Nullable handler: Handler)
Returns a font Typeface associated with a particular resource ID asynchronously.
open fun getFont(@NonNull context: Context, @FontRes id: Int, @NonNull value: TypedValue, style: Int, @Nullable fontCallback: ResourcesCompat.FontCallback): Typeface
Used by TintTypedArray.