Android截图

通过定义一个画布,来获取控件的图片

    public Bitmap screenShot(View view) {
        Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(),
                Config.ARGB_8888);
        Canvas canvas = new Canvas(bitmap);
        view.draw(canvas);
        return bitmap;
    }
原文地址:https://www.cnblogs.com/qinghuaideren/p/3865743.html