Why do I get this Exception?
05-18 20:29:38.044: ERROR/AndroidRuntime(5453): java.lang.IllegalArgumentException: The key must be an application-specific reso
THIS WILL DO THE JOB...
If you just have 1 setTag in your class, you could use any int, maybe static final declared in the top.
The problem comes when you had 2 or more setTag's with different keys. I mean:
public static final int KEY_1 = 1;
public static final int KEY_2 = 2;
...
setTag(KEY_1)
setTag(KEY_2)
...
That scenario is wrong. You then need to add a value file called maybe ids.xml with the following:
Then, in your class, call:
...
setTag(R.id.resourceDrawable, KEY_1)
setTag(R.id.imageURI, KEY_2)
...