avatar-view
avatar-view copied to clipboard
Can not be captured if located in a ViewGroup
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!