【发布时间】:2014-02-26 16:21:52
【问题描述】:
我想在通知的大视图部分显示动态加载的图像。我的通知具有大视图版本的自定义布局。
所以从技术上讲,我需要从网上下载一张图片,然后在 RemoteViews 对象内的 ImageView 中显示它。
我无法成功的部分是:如何让下载的 Bitmap 显示在我的 RemoteViews 的 ImageView 中对象?
这是我尝试过的:
Bitmap bm = getBitmapFromURL(items.get(0).imageUrl);
remoteViews.setBitmap(R.id.iv2, "android:src", bm);
这是我收到的例外情况:
android.app.RemoteServiceException:从包 com.example 发布的错误通知:无法扩展 RemoteViews:StatusBarNotification
【问题讨论】:
标签: android notifications imageview