如图,控件是有阴影效果的,截图之后阴影就没有了
这是截图代码
``` public static Bitmap shotScrollView(ScrollView scrollView) {
int h = 0;
Bitmap bitmap = null;
for (int i = 0; i < scrollView.getChildCount(); i++) {
h += scrollView.getChildAt(i).getHeight();
// scrollView.getChildAt(i).setBackgroundColor(Color.parseColor("#DEFBFB"));
}
bitmap = Bitmap.createBitmap(scrollView.getWidth(), h, Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(bitmap);
scrollView.draw(canvas);
return bitmap;
}
已经解决了,使用cardview生成的阴影就截不到,换了一种阴影生成方式
https://www.cnblogs.com/laoyimou/p/6639685.html
这个不是阴影,,这个是控件效果而已