private fun changedrawabletoUri(resourceId :Int):Uri{
val imageUri = (Uri.Builder())
.scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
.authority(resources.getResourcePackageName(resourceId))
.appendPath(resources.getResourceTypeName(resourceId))
.appendPath(resources.getResourceEntryName(resourceId))
.build()
return imageUri
}
Created
June 16, 2022 10:08
-
-
Save sahildev001/1692ab4d22c8f5a8cd3d363c9ab9b79d to your computer and use it in GitHub Desktop.
get image uri from drawable android
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment