【发布时间】:2018-02-05 10:28:47
【问题描述】:
我的布局根目录中有一个带有 RelativeLayout 的自定义通知。我需要将背景图像设置为此RelativeLayout。我有一个图片网址,然后我使用毕加索下载位图。 有没有办法将位图设置为自定义通知?
所有答案都是关于位于资源remoteView.setInt(R.id.viewid, "setBackgroundResource", R.color.your_color) 中的设置颜色或图像。
【问题讨论】:
-
你用过这个方法吗? setImageViewBitmap(int viewId, Bitmap bitmap)
-
问题是viewId不是imageView,而是RelativeLayout
标签: android notifications custom-notification