Skip to content

Instantly share code, notes, and snippets.

@narenmanoharan
Last active April 29, 2020 20:50
Show Gist options
  • Save narenmanoharan/613090d0df1d61aa8e46367279850dbb to your computer and use it in GitHub Desktop.
Save narenmanoharan/613090d0df1d61aa8e46367279850dbb to your computer and use it in GitHub Desktop.
Capturing a screenshot of the rootView
// Simple screenshot
ScreenCaptor.takeScreenshot(
view = rootView,
screenshotFilename = "my_favorite_screenshot"
)
// Screenshot with all the configurations
ScreenCaptor.takeScreenshot(
view = rootView,
screenshotFilename = "my_favorite_screenshot",
screenshotNameSuffix = "latest",
viewIdsToExclude = setOf(R.id.date, R.id.account_value),
screenshotFormat = PNG,
screenshotQuality = BEST
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment