getResourceId (int index, int defValue)
It's the defValue is stands for the Value to return if the attribute is not defined or not a resource.
more explanation :
public int getResourceId (int index, int defValue)
Added in API level 1 Retrieve 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.
Parameters index Index of attribute to retrieve. defValue Value to
return if the attribute is not defined or not a resource. Returns
Attribute resource identifier, or defValue if not defined.