Lỗi string resource up a level not found năm 2024

Class for accessing an application's resources. This sits on top of the asset manager of the application [accessible through

public XmlResourceParser getAnimation [int id]

  1. and provides a high-level API for getting typed data from the assets.

The Android resource system keeps track of all non-code assets associated with an application. You can use this class to access your application's resources. You can generally acquire the

public XmlResourceParser getAnimation [int id]

6 instance associated with your application with

public XmlResourceParser getAnimation [int id]

7.

The Android SDK tools compile your application's resources into the application binary at build time. To use a resource, you must install it correctly in the source tree [inside your project's

public XmlResourceParser getAnimation [int id]

8 directory] and build your application. As part of the build process, the SDK tools generate symbols for each resource, which you can use in your application code to access the resources.

Using application resources makes it easy to update various characteristics of your application without modifying code, and—by providing sets of alternative resources—enables you to optimize your application for a variety of device configurations [such as for different languages and screen sizes]. This is an important aspect of developing Android applications that are compatible on different types of devices.

For more information about using resources, see the documentation about Application Resources.

Nested classes

public XmlResourceParser getAnimation [int id]

9

public final AssetManager getAssets []

0

This exception is thrown by the resource APIs when a requested resource can not be found.

public XmlResourceParser getAnimation [int id]

9

public final AssetManager getAssets []

2

This class holds the current attribute values for a particular theme.

Constants

public final AssetManager getAssets []

3

public final AssetManager getAssets []

4

The

public final AssetManager getAssets []

5 resource ID.

Public constructors

public final AssetManager getAssets []

6

This constructor is deprecated. Resources should not be constructed by apps. See

public final AssetManager getAssets []

7.

Public methods

public final AssetManager getAssets []

8

public final AssetManager getAssets []

9

Adds a loader to the list of loaders.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public static int getAttributeSetSourceResId [AttributeSet set]

1

Called by zygote when it is done preloading resources, to change back to normal Resources operation.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public static int getAttributeSetSourceResId [AttributeSet set]

3

Call this to remove all cached loaded layout resources from the Resources object.

public static int getAttributeSetSourceResId [AttributeSet set]

4

public static int getAttributeSetSourceResId [AttributeSet set]

5

Return an XmlResourceParser through which you can read an animation description for the given resource ID.

public static int getAttributeSetSourceResId [AttributeSet set]

6

public static int getAttributeSetSourceResId [AttributeSet set]

7

Retrieve underlying AssetManager storage for these resources.

public static int getAttributeSetSourceResId [AttributeSet set]

8

public static int getAttributeSetSourceResId [AttributeSet set]

9

Returns the resource ID of the resource that was used to create this AttributeSet.

public boolean getBoolean [int id]

0

public boolean getBoolean [int id]

1

Return a boolean associated with a particular resource ID.

public boolean getBoolean [int id]

2

public boolean getBoolean [int id]

3

This method was deprecated in API level 23. Use

public boolean getBoolean [int id]

4 instead.

public boolean getBoolean [int id]

2

public boolean getBoolean [int id]

6

Returns a themed color integer associated with a particular resource ID.

public boolean getBoolean [int id]

7

public boolean getBoolean [int id]

8

Returns a themed color state list associated with a particular resource ID.

public boolean getBoolean [int id]

7

public int getColor [int id]

0

This method was deprecated in API level 23. Use

public int getColor [int id]

1 instead.

public int getColor [int id]

2

public int getColor [int id]

3

Return the current configuration that is in effect for this resource object.

public int getColor [int id]

4

public int getColor [int id]

5

Retrieve a dimensional for a particular resource ID.

public boolean getBoolean [int id]

2

public int getColor [int id]

7

Retrieve a dimensional for a particular resource ID for use as an offset in raw pixels.

public boolean getBoolean [int id]

2

public int getColor [int id]

9

Retrieve a dimensional for a particular resource ID for use as a size in raw pixels.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
00

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
01

Returns the current display metrics that are in effect for this resource object.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
02

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
03

Return a drawable object associated with a particular resource ID and styled for the specified theme.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
02

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
05

This method was deprecated in API level 22. Use

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
06 instead.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
02

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
08

This method was deprecated in API level 22. Use

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
09 instead.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
02

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
11

Return a drawable object associated with a particular resource ID for the given screen density in DPI and styled for the specified theme.

public int getColor [int id]

4

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
13

Retrieve a floating-point value for a particular resource ID.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
14

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
15

Return the Typeface value associated with a particular resource ID.

public int getColor [int id]

4

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
17

Retrieve a fractional unit for a particular resource ID.

public boolean getBoolean [int id]

2

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
19

Return a resource identifier for the given resource name.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
20

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
21

Return the int array associated with a particular resource ID.

public boolean getBoolean [int id]

2

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
23

Return an integer associated with a particular resource ID.

public static int getAttributeSetSourceResId [AttributeSet set]

4

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
25

Return an XmlResourceParser through which you can read a view layout description for the given resource ID.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
26

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
27

This method was deprecated in API level 29. Prefer

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
28.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
30

Formats the string necessary for grammatically correct pluralization of the given resource ID for the given quantity, using the given arguments.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
32

Returns the string necessary for grammatically correct pluralization of the given resource ID for the given quantity.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
33

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
34

Returns the character sequence necessary for grammatically correct pluralization of the given resource ID for the given quantity.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
36

Return the entry name for a given resource identifier.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
38

Return the full name for a given resource identifier.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
40

Return the package name for a given resource identifier.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
42

Return the type name for a given resource identifier.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
44

Return the string value associated with a particular resource ID. It will be stripped of any styled text information.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
46

Return the string value associated with a particular resource ID, substituting the format arguments as defined in

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
47 and

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
48. It will be stripped of any styled text information.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
49

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
50

Return the string array associated with a particular resource ID.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
51

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
52

Return a global shared Resources object that provides access to only system resources [no application resources], is not configured for the current screen [can not use dimension units, does not change based on orientation, etc], and is not affected by Runtime Resource Overlay.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
33

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
54

Return the string value associated with a particular resource ID.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
33

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
56

Return the string value associated with a particular resource ID. The returned object will be a String if this is a plain string; it will be some other type of CharSequence if it is styled.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
57

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
58

Return the styled text array associated with a particular resource ID.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
60

Return the raw data associated with a particular resource ID.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
62

Return the raw data associated with a particular resource ID.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
64

Get the raw value associated with a resource with associated density.

public static int getAttributeSetSourceResId [AttributeSet set]

4

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
66

Return an XmlResourceParser through which you can read a generic XML resource for the given resource ID.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
67

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
68

Generate a new Theme object for this set of Resources.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
69

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
70

Retrieve a set of basic attribute values from an AttributeSet, not performing styling of them using a theme and/or style resources.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
69

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
72

Return an array of heterogeneous values.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
73

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
74

Open a data stream for reading a raw resource.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
73

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
76

Open a data stream for reading a raw resource.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
77

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
78

Open a file descriptor for reading a raw resource.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
80

Parse a name/value pair out of an XML tag holding that data.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
82

Parse a series of

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
83 tags from an XML file.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
85

Removes loaders from the list of loaders.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
87

This method was deprecated in API level 25. See

public final AssetManager getAssets []

7.

Inherited methods

From class

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
89

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
90

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
91

Creates and returns a copy of this object.

public boolean getBoolean [int id]

0

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
93

Indicates whether some other object is "equal to" this one.

public final AssetManager getAssets []

8

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
95

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
96

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
97

Returns the runtime class of this

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
98.

public boolean getBoolean [int id]

2

public void addLoaders [ResourcesLoader... loaders]

00

Returns a hash code value for the object.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public void addLoaders [ResourcesLoader... loaders]

02

Wakes up a single thread that is waiting on this object's monitor.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public void addLoaders [ResourcesLoader... loaders]

04

Wakes up all threads that are waiting on this object's monitor.

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
29

public void addLoaders [ResourcesLoader... loaders]

06

Returns a string representation of the object.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public void addLoaders [ResourcesLoader... loaders]

08

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public void addLoaders [ResourcesLoader... loaders]

10

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

public static int getAttributeSetSourceResId [AttributeSet set]

0

public void addLoaders [ResourcesLoader... loaders]

12

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

ID_NULL

public static final int ID_NULL

The

public final AssetManager getAssets []

5 resource ID. This denotes an invalid resource ID that is returned by the system when a resource is not found or the value is set to

public void addLoaders [ResourcesLoader... loaders]

14 in XML.

Constant Value: 0 [0x00000000]

Public constructors

Resources

public Resources [AssetManager assets,

            [DisplayMetrics][//developer.android.com/reference/android/util/DisplayMetrics] metrics, 
            [Configuration][//developer.android.com/reference/android/content/res/Configuration] config]
This constructor is deprecated. Resources should not be constructed by apps. See

public final AssetManager getAssets []

7.

Create a new Resources object on top of an existing set of assets in an AssetManager.

Parameters

public void addLoaders [ResourcesLoader... loaders]

16

public void addLoaders [ResourcesLoader... loaders]

17: Previously created AssetManager.

public void addLoaders [ResourcesLoader... loaders]

18

public void addLoaders [ResourcesLoader... loaders]

19: Current display metrics to consider when selecting/computing resource values.

public void addLoaders [ResourcesLoader... loaders]

20

public void addLoaders [ResourcesLoader... loaders]

21: Desired device configuration to consider when selecting/computing resource values [optional].

Public methods

addLoaders

public void addLoaders [ResourcesLoader... loaders]

Adds a loader to the list of loaders. If the loader is already present in the list, the list will not be modified.

This should only be called from the UI thread to avoid lock contention when propagating loader changes.

Chủ Đề