I am reading docs about getResourceId() method. It says that:
Retrieves the resource identifier for the attribute at index. Note that attribute resource as resolved when the overall TypedArray object is retrieved. As a result, this function will return the resource identifier of the final resource value that was found, not necessarily the original resource that was specified by the attribute.
So
- the first paragraph is clear:
Retrieves the resource identifier for the attribute at index.
- the second is clear too:
Note that attribute resource as resolved when the overall TypedArray object is retrieved.
- but what means the 3 paragraph? why it could return not necessarily the original resource id?
As a result, this function will return the resource identifier of the final resource value that was found, not necessarily the original resource that was specified by the attribute.