Created
October 18, 2017 07:51
-
-
Save pantos27/c44f5a76bf926b46ec83507f865a8266 to your computer and use it in GitHub Desktop.
Android get resource uri
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Uri getResourceUri(Resources resources, int resourceID) { | |
return Uri.parse("android.resource://"+resources.getResourcePackageName(resourceID)+"/"+ | |
resources.getResourceTypeName(resourceID) + '/' | |
+ resources.getResourceEntryName(resourceID) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment