bamlab / react-native-image-header-scroll-view

ScrollView with an image in header which becomes a navbar
MIT License
990 stars 94 forks source link

No Text Appears #59

Closed mkrotel14 closed 5 years ago

mkrotel14 commented 5 years ago

Hello, i'm trying to use the header scroll but the header is not rendering anything, I can change the Heights, Overlays and the headerContainerStyle, but when i try to put some text in the renderForeground it doesn't show or renderFixedForeground, what am I missing?

{ "react": "16.6.3", "react-native": "0.58.4" }

<HeaderScrollView 
  bounces={false}
  minHeight={80}
  maxHeight={300}
  minOverlayOpacity={0}
  maxOverlayOpacity={0}
  headerContainerStyle={{backgroundColor: '#F4511E'}}               
  renderForeground={() => {
    <View style={{ height: 150, justifyContent: "center", alignItems: "center" }} >
      <TouchableOpacity onPress={() => console.log("tap!!")}>
        <Text style={{ backgroundColor: "transparent" }}>Tap Me!</Text>
      </TouchableOpacity>
    </View>
  }}
>
   {this.props.children}
</HeaderScrollView>
Nhacsam commented 5 years ago

Is it fixed ? Can you explain what the error was to update the documentation ?

mkrotel14 commented 5 years ago

I'm not sure what I did to make it work, i just create another project and started the development again. I think it was some code insire my component, because this code was as prop.child. Suddenly It start to work