используйте что-то подобное в своем контакте
/////declare variable/////
float downx = 0;
float downy = 0;
float upx = 0;
float upy = 0;
Canvas canvas;
Paint paint;
///////put this in on create//////
imageView = (ImageView)findViewById(R.id.ImageView);
bitmap = Bitmap.createBitmap(480,640,Bitmap.Config.ARGB_8888);
Display currentDisplay = getWindowManager().getDefaultDisplay();
float dw = currentDisplay.getWidth();
float dh = currentDisplay.getHeight();
canvas = new Canvas(bitmap);
paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setStrokeWidth(6);
paint.setStrokeMiter(2);
paint.setStyle(Paint.Style.STROKE);
paint.setColor(Color.RED);
imageView.setImageBitmap(bitmap);
imageView.setOnTouchListener(this);
/////bitmap = your bitmap you want to load as back ground/////
/////your on touch method///////
public boolean onTouch(View v, MotionEvent event) {
int action = event.getAction();
switch (action)
{
case MotionEvent.ACTION_DOWN:
downx = event.getX();
downy = event.getY();
break;
case MotionEvent.ACTION_MOVE:
upx = event.getX();
upy = event.getY();
canvas.drawLine(downx, downy, upx, upy, paint);
imageView.invalidate();
downx = upx;
downy = upy;
break;
case MotionEvent.ACTION_UP:
upx = event.getX();
upy = event.getY();
canvas.drawLine(downx, downy, upx, upy, paint);
imageView.invalidate();
break;
case MotionEvent.ACTION_CANCEL:
break;
default:
break;
}
return true;
}
Я надеюсь, что вы получили свой ответ ..