monterosalondon / react-native-parallax-scroll

Parallax scroll view for react-native
MIT License
555 stars 62 forks source link

Issues when styling ParallaxScroll on Android #11

Closed timothystewart6 closed 6 years ago

timothystewart6 commented 6 years ago

"@monterosa/react-native-parallax-scroll": "^1.4.3" "react-native": "^0.49.5"

There seems to be an issue when setting the style prop on android.

const styles = StyleSheet.create({
  scrollView: {
    backgroundColor: 'blue',
  },
})

<ParallaxScroll
        style={scrollView}
...
/>

I set the backgroundColor to blue to exaggerate it. It's white if I set it to transparent.

ios

ios

android

android

z4o4z commented 6 years ago

@timothystewart6 I have just checked it and everything works fine for me(Android 7.1, Sony Xperia z5). Can you provide more information?

timothystewart6 commented 6 years ago

For sure. I will give it another go tonight. I may not be using it properly. I am passing in a view and list like this (sorry I can't see the code right now):

<ParallaxScroll
        style={scrollView}
        renderParallaxBackground={() => (
         <Image />
        )}
        refreshControl={
          <RefreshControl>
             ...
          </RefreshControl>
        }
> 
  <View>
    ...
    <SectionList>
      ...
    </SectionList>
  </View>
</ParallaxScroll>
timothystewart6 commented 6 years ago

🤦‍♂️

I figured it out. I was setting my own paddingTop along with setting parallaxHeight prop value. Sorry for the bother! Thanks for a great component!

z4o4z commented 6 years ago

@timothystewart6 no problems)