/**
* get uri to drawable or any other resource type if u wish
* @param context - context
* @param drawableId - drawable res id
* @return - uri
*/
public static String getUriToDrawable(@NonNull Context context, @AnyRes int drawableId) {
String imageUri = ContentResolver.SCHEME_ANDROID_RESOURCE +
"://" + context.getResources().getResourcePackageName(drawableId)
+ '/' + context.getResources().getResourceTypeName(drawableId)
+ '/' + context.getResources().getResourceEntryName(drawableId);
return imageUri;
}
NotificationBuilder.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:AlexaAndroid
作者:
评论列表
文章目录