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

When RoborazziRule's CaptureType is set to either AllImage or Gif, changes to the ImageView aren't reflected in the screenshot #9

Open
colinrtwhite opened this issue Mar 25, 2023 · 3 comments

Comments

@colinrtwhite
Copy link

colinrtwhite commented Mar 25, 2023

Setting ImageView.setDrawable isn't reflected in the screenshot. Here's a test that reproduces the issue. The test updates the image view's drawable to a red box, but the resulting screenshot is empty. Interestingly, using imageView.drawToBitmap renders the red square correctly.

Also is it possible to change the size of the screenshot? Thanks!

@takahirom
Copy link
Owner

takahirom commented Mar 25, 2023

Thanks. Perhaps it is because Roborazzi only sees the layout changes.
https://github.com/takahirom/roborazzi/blob/main/roborazzi/src/main/java/com/github/takahirom/roborazzi/Roborazzi.kt#L195

I'll see what I can do about it, but for now it might be a good idea to have it taken with captureRoboImage().
As for image size, I don't think there is a workaround at this time, so I will consider it as soon as possible.

@colinrtwhite
Copy link
Author

Using captureRoboImage works great, thanks!

@takahirom
Copy link
Owner

Thanks for your feedback.
I'm working on resize issue 💪
#13

@takahirom takahirom changed the title ImageView changes aren't reflected in screenshot When RoborazziRule's CaptureType is set to either AllImage or Gif, changes to the ImageView aren't reflected in the screenshot Aug 12, 2023
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

2 participants