Lo que quiero, el texto se mueve con el dedo sobre la imagen, en el botón clic redibuja la imagen existente en una nueva que es como texto pegado en ella.mover texto y volver a dibujar los problemas del dispositivo de imagen
funciona bien para v3.1, así como en Emulator. pero traté de probar en el dispositivo v2.2 se produce el forse Cerrar. Mientras que tiene todo el soporte para los dispositivos. ¿Me puede ayudar a salir de aquí? Será crucial en unas pocas semanas. Gracias de antemano.
///Redrawing the image & touchin Move of the Canvas with text
public void redrawImage(String path,float sizeValue,String textValue,int colorValue) {
BitmapFactory.Options options = new BitmapFactory.Options();
try {
options.inMutable = true;
} catch (Exception e) {
// TODO: handle exception
System.out.println("#############Error is======"+e.getMessage());
}
Bitmap bm = BitmapFactory.decodeFile(path,options);
proxy = Bitmap.createBitmap(bm.getWidth(), bm.getHeight(), Config.ARGB_8888);
Canvas c = new Canvas(proxy);
//Here, we draw the background image.
c.drawBitmap(bm, new Matrix(), null);
Paint paint = new Paint();
paint.setColor(colorValue); // Text Color
paint.setStrokeWidth(30); // Text Size
paint.setTextSize(sizeValue);
System.out.println("Values passing=========="+someGlobalXvariable+", "+someGlobalYvariable+", "
+sizeValue+", "+textValue);
//Here, we draw the text where the user last touched.
c.drawText(textValue, someGlobalXvariable, someGlobalYvariable, paint);
popImgae.setImageBitmap(proxy);
}
¿Se puede publicar el registro de errores de logcat? – Zelleriation
options.inMutable = true; es compatible desde: API Nivel 11, y no necesita cargar bitmap bm como Mutable. solo el proxy de mapa de bits debe ser mutable –