enhancementhelp wanted
仓库指标
- 星标
- (1,208 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
This is very useful when taking screenshots of dynamic height views. We don't always force a view to have a height, and the underlying Facebook implementation allows it by simply not setting a height:
/*
* Measure and layout the view. In this example we give an exact
* width but all the height to be WRAP_CONTENT.
*/
ViewHelpers.setupView(view)
.setExactWidthDp(300)
.layout();
Expected behaviour
If I send null as height, I want to take a screenshot with WRAP_CONTENT
Actual behaviour
If I send null as height, I have metrics.heightPixels (fullscreen) as a default
Steps to reproduce
compareScreenshot(
view = view,
heightInPx = null,
widthInPx = 600
)
Version of the library
4.1+, from the moment shot-android wrapper was released.