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

168
Visualizações
Using Scroll View in React Native

enter image description here

I want parent Screen to be fixed and Child Screen to be scrollable. using scroll doesn't provide me that functionality so what should I do ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The ScrollView component does exactly what you want. The order of your components is the only important factor here.

In general, everything that is nested inside a ScrollView is scrollable, and everything outside is not. Hence,

<View>
    <View>
        // not scrollable
    </View>
    <ScrollView>
        // scrollable
    </ScrollView>
    <View>
      // not scrollable
    </View>
</View>

Here is an example of a scrollable container using ScrollView that is nested inside a parent View which is fixed, meaning not scrollable.

<SafeAreaView style={{ margin: 5 }}>
      <View>
        {Array(5)
          .fill(0)
          .map((_) => {
            return (
              <View style={{ margin: 10 }}>
                <Text>Not scrollable</Text>
              </View>
            )
          })}
      </View>
      <ScrollView>
        {Array(5)
          .fill(0)
          .map((_) => {
            return (
              <View style={{ margin: 10 }}>
                <Text>Scrollable</Text>
              </View>
            )
          })}
      </ScrollView>
      <View>
        {Array(5)
          .fill(0)
          .map((_) => {
            return (
              <View style={{ margin: 10 }}>
                <Text>Also not scrollable</Text>
              </View>
            )
          })}
      </View>
    </SafeAreaView>

which yields five text components at that top which are not scrollable, followed by five text components that are scrollable, followed by five text components that aren't scrollable.

about 4 years ago · Juan Pablo Isaza Relatório
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