Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

173
Vistas
How to disable scroll inside a particular view?

I'm trying to get ScrollView to Scroll horizontally only when sliding a particular view something like this:

<ScrollView horizontal={true}>
 <View style={styles.TopView}></View>
 <View style={styles.BottomView} Scrollable={false}></View>
</ScrollView>

I was thinking of disabling the scroll OnPressIn using hooks like this:

const [Scrollmove, setScrollmove] = useState(true);

    <ScrollView horizontal={true} scrollEnabled ={Scrollmove}>
     <View style={styles.TopView}></View>
     <Pressable 
       onPressIn={()=>{setScrollmove(false)}} 
       onPressOut={()=>{setScrollmove(true)}}>
       <View style={styles.BottomView}></View>
     </Pressable>
    </ScrollView>

but I don't know if it would work and is there a better way to achieve the desired effect?

Note: the code segments I've written above are pseudo code

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can't do that. However, you can change your design like, divide your screen and half of it can be scroll, other half can stay.

<View style={styles.TopView}>
   <Text>Stay</Text>
</View>
<ScrollView horizontal={true}>
 <View style={styles.BottomView} Scrollable={false}>
 <Text>Scrollable</Text>
</View>
</ScrollView>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda