📅  最后修改于: 2022-03-11 14:52:26.506000             🧑  作者: Mango
Bitmap b = Bitmap.createBitmap(targetView.getWidth(),
targetView.getHeight(),
Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
targetView.draw(c);
BitmapDrawable d = new BitmapDrawable(getResources(), b);
canvasView.setBackgroundDrawable(d);