Stay organized with collections
Save and categorize content based on your preferences.
android.content.res
Contains classes for accessing application resources,
such as raw asset files, colors, drawables, media, or other files
in the package, plus important device configuration details
(orientation, input types, etc.) that affect how the application may behave.
For more information, see the Application Resources guide.
Interfaces
Classes
Exceptions
Interfaces
Classes
Exceptions
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# android.content.res\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nandroid.content.res\n===================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/content/res/package-summary \"View this page in Kotlin\") \\|Java\n\nContains classes for accessing application resources,\nsuch as raw asset files, colors, drawables, media, or other files\nin the package, plus important device configuration details\n(orientation, input types, etc.) that affect how the application may behave.\n\nFor more information, see the [Application Resources](/guide/topics/resources) guide.\n\n\nInterfaces\n----------\n\n|-------------------------------------------------------------------------|---------------------------------------------------------|\n| [FontScaleConverter](/reference/android/content/res/FontScaleConverter) | A converter for non-linear font scaling. |\n| [XmlResourceParser](/reference/android/content/res/XmlResourceParser) | The XML parsing interface returned for an XML resource. |\n\nClasses\n-------\n\n|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AssetFileDescriptor](/reference/android/content/res/AssetFileDescriptor) | File descriptor of an entry in the AssetManager. |\n| [AssetFileDescriptor.AutoCloseInputStream](/reference/android/content/res/AssetFileDescriptor.AutoCloseInputStream) | An InputStream you can create on a ParcelFileDescriptor, which will take care of calling [ParcelFileDescriptor.close()](/reference/android/os/ParcelFileDescriptor#close()) for you when the stream is closed. |\n| [AssetFileDescriptor.AutoCloseOutputStream](/reference/android/content/res/AssetFileDescriptor.AutoCloseOutputStream) | An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling [ParcelFileDescriptor.close()](/reference/android/os/ParcelFileDescriptor#close()) for you when the stream is closed. |\n| [AssetManager](/reference/android/content/res/AssetManager) | Provides access to an application's raw asset files; see [Resources](/reference/android/content/res/Resources) for the way most applications will want to retrieve their resource data. |\n| [AssetManager.AssetInputStream](/reference/android/content/res/AssetManager.AssetInputStream) | |\n| [ColorStateList](/reference/android/content/res/ColorStateList) | Lets you map [View](/reference/android/view/View) state sets to colors. |\n| [Configuration](/reference/android/content/res/Configuration) | This class describes all device configuration information that can impact the resources the application retrieves. |\n| [ObbInfo](/reference/android/content/res/ObbInfo) | Basic information about a Opaque Binary Blob (OBB) that reflects the info from the footer on the OBB file. |\n| [ObbScanner](/reference/android/content/res/ObbScanner) | Class to scan Opaque Binary Blob (OBB) files. |\n| [Resources](/reference/android/content/res/Resources) | Class for accessing an application's resources. |\n| [Resources.Theme](/reference/android/content/res/Resources.Theme) | This class holds the current attribute values for a particular theme. |\n| [TypedArray](/reference/android/content/res/TypedArray) | Container for an array of values that were retrieved with [Resources.Theme.obtainStyledAttributes(AttributeSet, int[], int, int)](/reference/android/content/res/Resources.Theme#obtainStyledAttributes(android.util.AttributeSet,%20int[],%20int,%20int)) or [Resources.obtainAttributes](/reference/android/content/res/Resources#obtainAttributes(android.util.AttributeSet,%20int[])). |\n\nExceptions\n----------\n\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [Resources.NotFoundException](/reference/android/content/res/Resources.NotFoundException) | This exception is thrown by the resource APIs when a requested resource can not be found. |\n\n-\n\n Interfaces\n ----------\n\n - [FontScaleConverter](/reference/android/content/res/FontScaleConverter)\n - [XmlResourceParser](/reference/android/content/res/XmlResourceParser)\n-\n\n Classes\n -------\n\n - [AssetFileDescriptor](/reference/android/content/res/AssetFileDescriptor)\n - [AssetFileDescriptor.AutoCloseInputStream](/reference/android/content/res/AssetFileDescriptor.AutoCloseInputStream)\n - [AssetFileDescriptor.AutoCloseOutputStream](/reference/android/content/res/AssetFileDescriptor.AutoCloseOutputStream)\n - [AssetManager](/reference/android/content/res/AssetManager)\n - [AssetManager.AssetInputStream](/reference/android/content/res/AssetManager.AssetInputStream)\n - [ColorStateList](/reference/android/content/res/ColorStateList)\n - [Configuration](/reference/android/content/res/Configuration)\n - [ObbInfo](/reference/android/content/res/ObbInfo)\n - [ObbScanner](/reference/android/content/res/ObbScanner)\n - [Resources](/reference/android/content/res/Resources)\n - [Resources.Theme](/reference/android/content/res/Resources.Theme)\n - [TypedArray](/reference/android/content/res/TypedArray)\n-\n\n Exceptions\n ----------\n\n - [Resources.NotFoundException](/reference/android/content/res/Resources.NotFoundException)"]]