NotificationBuilder.java 文件源码

java
阅读 43 收藏 0 点赞 0 评论 0

项目:AlexaAndroid 作者:
/**
 * 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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号