Capture ScrollView beyond screen get black background
See original GitHub issueEnvironment
Android: 7.0 React Native: 0.53.3 react-native-view-shot: 2.3.0
Describe
Capture ScrollView container , the beyond screen part get black background
the black part is beyond screen
code
import { captureRef } from 'react-native-view-shot'
captureScreen = () => {
console.log('this is captureScreen')
captureRef(this.refs.Sc, {
format: 'jpg',
result: 'base64',
snapshotContentContainer: true
})
.then(res => {
console.log(`data:image/jpg;base64,${res}`, 'this is res')
}).catch(error => {
console.log(error, 'this is error')
})
}
<ScrollView
ref='Sc'
collapsable={false}
>
<View>
<Text>This is test</Text>
</View>
</ScrollView>
Expect
the beyond screen part not get black background
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
scrollview causes black background to appear - Stack Overflow
Since the backgroud of the complete page is grey, this black area distorts the complete screen. I used scroll views many times before...
Read more >ScrollView - React Native
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
Read more >ScrollView - Android Developers
Scroll view may have only one direct child placed within it. To add multiple views within the ... android:background, A drawable to use...
Read more >ScrollView - React Native
white , scroll indicator is white. This style is good against a black content background. Type, Required, Platform. enum('default', 'black ...
Read more >How to ignore safe area insets in UIKit - Sarunw
As you can see, UIKit will automatically adjust content insets of a scroll view to make sure the content stays visible within a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try add
style={{backgroundColor:"#fff"}}
to ScrollView. like this:I just gave a style={{backgorundColor: ‘#fff’ to my ViewShot and got it fixed.