我想在通知的大視圖部分顯示動態加載的圖像。我的通知具有大視圖版本的自定義佈局。將圖像下載到自定義通知大視圖
因此從技術上講,我需要從網絡上下載的圖像,然後顯示它在的ImageView一個RemoteViews對象內。
我不能與成功的部分是:如何讓下載的位圖在的ImageView我RemoteViews對象的顯示?
這裏是我的嘗試:
Bitmap bm = getBitmapFromURL(items.get(0).imageUrl);
remoteViews.setBitmap(R.id.iv2, "android:src", bm);
這裏是個例外,我收到:
android.app.RemoteServiceException:從包com。示例貼壞通知:無法展開RemoteViews for:StatusBarNotification
謝謝。完美的作品:) –