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

Incorrect screenshot of ShapeableImageView with parent padding #271

Closed
dalapenko opened this issue Feb 26, 2024 · 3 comments
Closed

Incorrect screenshot of ShapeableImageView with parent padding #271

dalapenko opened this issue Feb 26, 2024 · 3 comments

Comments

@dalapenko
Copy link

Hello. When use Robarazzi for screenshot of view with ShapeableImageView which has parent with padding - I saw that screenshot has artefact like black border of image. When start application - view looks okay. I think that bug of robolectric's render, but SoF or any else source hasn't good fix. May be you know what going going bad?

Of course I made sample of problem: https://github.com/dalapenko/ShapeableRobolecticBug

and in attachment screenshots of difference between view on device when start app and Robarazzi screenshot:

view_on_device

view_on_device

roborazzi_screenshot

roborazzi_screenshot

@takahirom
Copy link
Owner

Thanks
This issue may be associated with Robolectric's hardware rendering. It appears that they are addressing it, so please wait for the time being. For more details, see: robolectric/robolectric#8592

@takahirom
Copy link
Owner

@dalapenko
Could you try using native graphics mode?
#255 (comment)

@dalapenko
Copy link
Author

@takahirom

Tested on my sample with robolectic 4.12-SNAPSHOT && robolectric.screenshot.hwrdr.native=true - render works as expected, issue was gone.

reference - image without native graphics mode
new -with it
tech dalapenko shapeablebug MainActivityTest shapeableImageTest_compare

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