ScrollView height gets cut by StatusBar height in standalone app
See original GitHub issueScrollView height gets cut by StatusBar height in standalone app when installed in android Nougat or Oreo, but works fine in lower versions (tested in KitKat) and also in development mode in expo client. This is happening for the last 2-3 weeks. Is it because of SDK/XDE upgradation? I’m using exp build:android for building apk.
Environment
OS: macOS Sierra 10.12.1 Node: 10.0.0 Target OS: Android
Steps to Reproduce
I have tried ScrollView inside View and then another View inside ScrollView with 100% height, window height, and flex layout. Also tried ScrollView inside View / View inside ScrollView.
Expected Behavior
Actual Behavior
Reproducible Demo
<View style={{ flex: 1, backgroundColor: 'green' }}>
<StatusBar hidden={ false } backgroundColor="#ff9933" barStyle="light-content" translucent={ true } />
<ScrollView showsVerticalScrollIndicator={ false } contentContainerStyle={{ flex: 1 }} style={{ backgroundColor: 'gray', padding: 10 }}>
<View style={{ flex: 1, backgroundColor: 'lightgray', minHeight: Dimensions.get('window').height }}>
</View>
</ScrollView>
</View>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
react native scrollView Height always stays static and does not ...
There is an existing limitation with ScrollView where height cannot be provided directly. Wrap the ScrollView in another View and give height to...
Read more >[Solved]-How to prevent UIView from being resized to fit ScrollView ...
Coding example for the question How to prevent UIView from being resized to fit ScrollView height (autoresizing disabled)?
Read more >Build a fully offline app using React Native and WatermelonDB
See how you can build a fully featured offline app using React Native for the frontend and WatermelonDB for data storage.
Read more >UIScrollView Class (UIKit) | Microsoft Learn
The need for and range of scrolling is specified by the application developer setting the UIScrollView's ContentSize to a SizeF greater than the...
Read more >keyboardavoidingview doesn't work - You.com | The AI Search ...
If you are using react-navigation, this is affected by the header of the react-navigation. The height of the header is vary on different...
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 Free
Top 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
@nicovanzyl @kmnwee
I fixed it this way:
In App.js I had to set StatusBar property hidden = false, translucent = true inside a View with flex = 1 and imported the component inside it.
In MyComponent:
Hi Guys,
I was able find a fix/workaround. Here’s what I did: -If you have “androidStatusBar” set in you app.json, remove it. -Use StatusBar component [import {StatusBar} from ‘react-native’] in your view to modify your status bar
Hope this works with you too!
-Ken