Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add ViewHelpers layout before Screenshot.snap on new arch
Without an explicit measure/layout pass, Screenshot.snap(surface.view)
captures a blank bitmap on Fabric. Mirror what the old arch path already
does with ViewHelpers so the view tree is software-rendered and properly
sized before capture.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • Loading branch information
EmilioBejasa and claude committed Mar 30, 2026
commit 2fba6a905309c2738143a104267e00cd6695fc93
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ abstract class BaseStoryScreenshotTest {

val screenshotName = storyId.replace("--", "_")
instrumentation.runOnMainSync {
ViewHelpers.setupView(view)
.setExactWidthPx(SCREEN_WIDTH_PX)
.setExactHeightPx(SCREEN_HEIGHT_PX)
.layout()
Screenshot.snap(view).setName(screenshotName).record()
}
Log.d(TAG, "Screenshot captured: $screenshotName")
Expand Down
Loading