I\'ve one ImageView in which I want to draw a Line. I\'ve done the follow:
mImagenCampo = (ImageView) findViewById(R.id.imagen_campo);
Try this:
private void crearPunto(float x, float y, float xend, float yend, int color) {
bmp = Bitmap.createBitmap(mImagenCampo.getWidth(), mImagenCampo.getHeight(), Config.ARGB_8888);
c = new Canvas(bmp);
mImagenCampo.draw(c);
Paint p = new Paint();
p.setColor(color);
c.drawLine(x, y, xend, yend, p);
mImagenCampo.setImageBitmap(bmp);
}