Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
Creating a ScrollView with a sticky top tab navigator?

Hello I am trying to create a component in my app that looks really similar to this. I am currently struggling with how to make it so that i can have a collapsible header that scrolls seamlessly through both the header and the nested tabs scrollviews.

Here's what i have so far. As you can see, the scrollview is causing both the header and the content area to scroll at the same time. I was wondering if there was a way to make the header scroll first (when at the top) and then the content area scrolling after.

Here is my code
Header with tabs Render in parent:

<Animated.View 
  style={[styles.headerScrollableContainerContent, {
    top: headerHeight
  }]} 
>
   <View>
      {...header content}
   </View
   {TabRender()}
</Animated.View>

Header height calculation:

const scrollY = useRef(new Animated.Value(0)).current;
const headerHeight = scrollY.interpolate({
   inputRange: [0, HEADER_SCROLL_DISTANCE],
   outputRange: [HEADER_MAX_HEIGHT, HEADER_MIN_HEIGHT],
   extrapolate: 'clamp',
});

About Tab:

<ScrollView
  style={styles.container}
  onScroll={Animated.event(
    [{nativeEvent: {contentOffset: {y: props.scrollY}}}],
    {useNativeDriver: false}
  )}
  scrollEventThrottle={16}
>
   {...Scroll content}
</ScrollView>

Please let me know if you have any ideas or suggestions. Any help would be truly appreciated!

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda