monterosalondon / react-native-parallax-scroll

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

Problem with zIndex using isForegroundTouchable #9

Closed fabiulous closed 6 years ago

fabiulous commented 6 years ago

I have a form in my foreground and it works great, but when I scroll the content, this form is above everything else and I am not able to place my scrollable content on top of it.

I tried using zIndex without any success, I tried going throught the source code, but this is my first app in react native and honestly I have no idea what else to try.

z4o4z commented 6 years ago

@shizpi Hi! Thanks for using it! Unfortunately, it is not possible to place scrollable content on top of the foreground in the current version.

z4o4z commented 6 years ago

@shizpi Fix it in the new version(1.4.0). Can you try this one and give me feedback?

fabiulous commented 6 years ago

Awesome! I will take a look today/tomorrow!

fabiulous commented 6 years ago

It seems I still have the same issue.

     <ParallaxScroll
        parallaxHeight={height - 140}
        renderParallaxForeground={() => (
          <ScrollView style={styles.container}>
            <CalculatorForm />
          </ScrollView>
        )}
        isForegroundTouchable={true}
        fadeOutParallaxForeground={true}
        parallaxBackgroundScrollSpeed={5}
        parallaxForegroundScrollSpeed={2.5}
      >
        <View style={{ paddingBottom: 80 }}>
          <Card />
          <OtherCard />
          <OtherCard />
          <OtherCard />
        </View>
      </ParallaxScroll>

screenshot_20170917-112150 screenshot_20170917-112158

z4o4z commented 6 years ago

@shizpi can you provide some styles?

fabiulous commented 6 years ago

For cards:

root: {
    marginLeft: 10,
    marginRight: 10,
    marginBottom: 10,
    padding: 25,
    backgroundColor: "#ffffff",
    borderRadius: 2,
  },

And the Form scrollview:

container: {
  padding: 10
},
fabiulous commented 6 years ago

Fixed! It wasn't working previously but in this latest version this works! I forgot to try using zIndex in my card component again. Thanks for the help!