How create resource id without a resource

Viewed 7397

I need to associate several tags to a view so I use

 view.setTag(id, tag_object)

Unfortunately Android requires to have the id as defined in a resource. However R file is auto generated of resource ids appearing in different resource files, so I do not know how to create an id detached from any resource. As work around I just use id of some resource but it isn't robust, because if I decide to remove the resource, the id can disappear. It is also reduces readability of the code having some weird id for addressing a tag. Perhaps I missed very simple trick as ids resource file.

2 Answers
Related