I have the code to add an image in an imageview:
try {
Glide.with(imagen.getContext())
.load(item.getIdImagen())
//.transform(new GestorImagenes(context, 90f))
.into(imagen);
} catch(Exception e) {
}
I also have the code that would add the watermark:
public Bitmap applyWaterMarkEffect(Bitmap src, String watermark, int x, int y, int color, int alpha, int size, boolean underline) {
int w = src.getWidth();
int h = src.getHeight();
Bitmap result = Bitmap.createBitmap(w, h, src.getConfig());
Canvas canvas = new Canvas(result);
canvas.drawBitmap(src, 0, 0, null);
Paint paint = new Paint();
paint.setColor(color);
paint.setAlpha(alpha);
paint.setTextSize(size);
paint.setAntiAlias(true);
paint.setUnderlineText(underline);
canvas.drawText(watermark, x, y, paint);
return result;
}
The problem is that I do not know how to combine them to show everything together. Should I take the image (bitmap) to pass it as a parameter? In that case, how do I take it?
Thank you!