I need to store the link to the image, which user has chosen. The sources of the images are files, contact icons and resources drawables (I need drawables since I provide different images for different resolutions/densities).
For the purpose of unification I store it in URI, and consequently this URI may be pointing to a file (file://
), to content provider or to resource (android.resource://...
). Here is how the URI pointing to drawable with id=2130837534 looks like:
android.resource://my.packagename/2130837534
除非 R.java
中的代号被重新生成,否则它仍然有效。 因此,有没有办法可以阻止SDK更改某些 R.java
ids 值?