Possible to use collapsible subheader with collapsible header?
Closed this issue · 1 comments
cmaycumber commented
Is it possible to use both the animated subheader and the header at the same time? Or is there an approach you would recommend to get the desired effect?
NoerNova commented
Yes, Just add translateY={translateY}
from useCollapsibleHeader
to CollapsibleSubHeaderAnimator
like this ...
const {onScroll, translateY, scrollIndicatorInsetTop} = useCollapsibleHeader({
navigationOptions: {
headerStyle: {
backgroundColor: 'transparent',
},
},
});
return(
<>
<CollapsibleSubHeaderAnimator translateY={translateY}>
{...child}
</CollapsibleSubHeaderAnimator>
</>
)