I\'m retrieving custom Resource IDs from a custom xml view type. I\'m asked to specify a default int value for the retrieval and was wondering what is the range of IDs? Are they
According to the documentation, Resources.getIdentifier()
Returns 0 if no such resource was found. (0 is not a valid resource ID.)
so you can use 0.
0 is a null/invalid value for a resource ID.
According to https://developer.android.com/reference/android/content/res/Resources#ID_NULL, 0
is the same as setting @null
in XML, meaning you can use it i.e. when you want to clear the resource.
It is an invalid resource ID.