Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

AppCompatResources

public final class AppCompatResources
extends Object

java.lang.Object
   ↳ androidx.appcompat.content.res.AppCompatResources


Class for accessing an application's resources through AppCompat, and thus any backward compatible functionality.

Summary

Public methods

static ColorStateList getColorStateList(Context context, int resId)

Returns the ColorStateList from the given resource.

static Drawable getDrawable(Context context, int resId)

Return a drawable object associated with a particular resource ID.

Inherited methods

Public methods

getColorStateList

public static ColorStateList getColorStateList (Context context, 
                int resId)

Returns the ColorStateList from the given resource. The resource can include themeable attributes, regardless of API level.

Parameters
context Context: context to inflate against

resId int: the resource identifier of the ColorStateList to retrieve

Returns
ColorStateList

getDrawable

public static Drawable getDrawable (Context context, 
                int resId)

Return a drawable object associated with a particular resource ID.

This method supports inflation of <vector>, <animated-vector> and <animated-selector> resources on devices where platform support is not available.

Parameters
context Context: context to inflate against

resId int: The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns
Drawable Drawable An object that can be used to draw this resource.