For a resource URI The format is:
“android.resource://[package]/[res id]”
[package] is your package name
[res id] is value of the resource ID, e.g. R.drawable.sample_1
However – what would I use for the package for a platform resource. For example, I would like the URI for the platform resource which is the favourited star.
Thanks a lot,
The package name for the platform resources is
"android", so the URI for e.g. thestar_big_onAndroid platform drawable is"android.resource://android/" + android.R.drawable.star_big_on.Here’s the code for an Activity that displays that URI in an ImageView:
Running the Activity will look something like this: