Open eddyjusufi opened 5 years ago
It should be if you have no foreground : https://github.com/bamlab/react-native-image-header-scroll-view/issues/6#issuecomment-320517228 Can I see your code ?
@Nhacsam I do have text as foreground. Is there any way to trigger the header bounce/zoom through it nonetheless? Here is what my code looks like:
<HeaderImageScrollView
maxHeight={MAX_HEIGHT}
minHeight={MIN_HEIGHT}
minOverlayOpacity={0}
maxOverlayOpacity={0}
headerImage={require("../../../assets/images/headerImage.jpg")}
renderForeground={() => (
<View style={{ flex: 1, flexDirection: 'row', alignSelf: "flex-end", alignItems: "flex-end" }} >
<TouchableOpacity onPress={() => console.log("tap!!")}>
<Text style={{ color: "white", backgroundColor: "transparent", alignSelf: "center" }}>Really long text with a link when pressed</Text>
</TouchableOpacity>
</View>
)}
>
<View style={{ flex: 1, height: 1000 }}>
<TriggeringView onHide={() => console.log("text hidden")}>
<Text>Scroll Me!</Text>
</TriggeringView>
</View>
</HeaderImageScrollView>
No, you can't right now, The foreground intercept the touch event and don't propagate it to the scrollView behind.
Is there a way to trigger the bounce/zoom when the user scrolls down by touching the header as well?