Android: cualquier biblioteca para agregar etiquetas de repost al mapa de bits
He estado tratando de hacer una aplicación para compartir fotos, con la capacidad de agregar su imagen y nombre a la imagen. He estado jugando con Canvas durante todo el día, pero no pude obtener buenos resultados. Pude dibujar el nombre y el mapa de bits, pero no se veían tan bien.
Es por eso que estoy preguntando si hay alguna biblioteca o código que pueda ayudarme a hacer algo similar a [esto] [1]. No pude encontrar nada para eso.
EDITAR: Perdón por no agregar mi propio código
Aquí está mi código de mi último intento
public void AddText(Position2D pos){
//Position2D is an enum having the 4 corners of the image
bmWorking= bmOriginal.copy(Bitmap.Config.ARGB_8888,true);
Canvas canvas = new Canvas(bmWorking);
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setStyle(Paint.Style.FILL);
Paint textPaint = new Paint();
textPaint.setColor(Color.BLACK);
float width = (35f/100f) * bmWorking.getWidth();
float height = (width/16f) * 3;
textPaint.setTextSize(height - 4); //I wanted to have some space (margin) above and below the text
textPaint.setTextAlign(Paint.Align.LEFT);
float [] coords = getPositionCoords(pos, width, height); //getPositionCoords returns a float array with the Left,Top,Right,Bottom position calculated based on the width and height
canvas.drawRect(coords[0],coords[1], coords[2], coords[3],paint);
username = "Haider Ali Punjabi";
canvas.drawText(username, coords[0] ,coords[3], textPaint);
bitmapView.setImageBitmap(bmWorking);
}
ACTUALIZAR: @pskink me dioeste codigo que funciona bien