1 Bitmap b = Bitmap.createBitmap(targetView.getWidth(),
2 targetView.getHeight(),
3 Bitmap.Config.ARGB_8888);
4 Canvas c = new Canvas(b);
5 targetView.draw(c);
6 BitmapDrawable d = new BitmapDrawable(getResources(), b);
7 canvasView.setBackgroundDrawable(d);