Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not be captured if located in a ViewGroup #28

Open
z4hyoung opened this issue Jan 31, 2018 · 0 comments
Open

Can not be captured if located in a ViewGroup #28

z4hyoung opened this issue Jan 31, 2018 · 0 comments

Comments

@z4hyoung
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant