📜  android 捕获视图和动画 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:26.506000             🧑  作者: Mango

代码示例1
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);