Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!