avatar-view icon indicating copy to clipboard operation
avatar-view copied to clipboard

Can not be captured if located in a ViewGroup

Open z4hyoung opened this issue 7 years ago • 0 comments

Hi Sir,

I put AvatarView into a ViewGroup(such as LinearLayout) in xml file, and capture the ViewGroup with code snippet like below

mSrcViewGroup.setDrawingCacheEnabled(true);
Bitmap bm = mSrcViewGroup.getDrawingCache();
Bitmap copy = bm.copy(bm.getConfig(), true);
mSrcViewGroup.setDrawingCacheEnabled(false);
mDstImageView.setImageBitmap(copy);

As result, the whole ViewGroup(including sub-view) is captured except AvatarView. But I'm able to capture AvatarView itself(that is avatarView.getDrawingCache()) successfully. Can you help on this please?

Thanks in advance!

z4hyoung avatar Jan 31 '18 14:01 z4hyoung