b2.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setContentView(R.layout.new_main);
String editTextStr = text.getText().toString();
Toast msg = Toast.makeText(getBaseContext(),"/sdcard/Stored_Images/" + editTextStr + ".jpg", Toast.LENGTH_LONG);
msg.show();
Bitmap bmp = BitmapFactory.decodeFile("/sdcard/Stored_Images/" + editTextStr + ".jpg");
ImageView img = (ImageView) findViewById(R.id.ImageView01);
img.setImageBitmap(bmp);
}
});
The code above displays an image on the screen that is saved on the sd card.
Canvas c = holder.lockCanvas();
c.drawARGB(255,0,0,0);
onDraw(c);
holder.unlockCanvasAndPost(c);
This code creates a canvas to draw on (black screen).
I want to be able to combine the two to set/display an image as the canvas so that I can draw on it. So if i take a picture of someones face, I want to be able to display that image so that I can draw a mustache or something on it.
You are probably better off creating the canvas, adding the bitmap image to it and then handling the user touch/drawing from there.
then for the drawing… sound like you have that figured out, but if not you can check out the fingerPaint samples from the api demos that demonstrate drawing on a canvas (which you would have your image on at that point.)