I had similar problem. For me the solution was to use the bitmap. These two methods should give you the answer or at least some kind of solution.
private void setCurrentStatus(Context context, RemoteViews remoteViews) {
Bitmap source = BitmapFactory.decodeResource(context.getResources(), R.mipmap.ic_launcher);
Bitmap result = changeBitmapColor(source, Color.YELLOW);
remoteViews.setBitmap(R.id.iv_icon, "setImageBitmap", result);
}
private Bitmap changeBitmapColor(Bitmap sourceBitmap, int color) {
Bitmap resultBitmap = Bitmap.createBitmap(sourceBitmap, 0, 0,
sourceBitmap.getWidth() - 1, sourceBitmap.getHeight() - 1);
Paint p = new Paint();
ColorFilter filter = new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN);
p.setColorFilter(filter);
Canvas canvas = new Canvas(resultBitmap);
canvas.drawBitmap(resultBitmap, 0, 0, p);
return resultBitmap;
}
R.id.iv_icon - is the id of the ImageView from the layout
You can always get drawable from your ImageView and convert it to bitmap.