参考的连接这里写链接内容
ll.setDrawingCacheEnabled(true);
ll.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
ll.layout(0, 0, ll.getMeasuredWidth(), ll.getMeasuredHeight());
Bitmap bitmap = Bitmap.createBitmap(ll.getDrawingCache());
ll.setDrawingCacheEnabled(false);
iv.setImageBitmap(bitmap);