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

207
Views
Ocultar y mostrar al desplazarse hacia la derecha y hacia la izquierda React-Native
  1. En React Native, estoy tratando de crear una Flatlist horizontal con flechas derecha e izquierda, y espero hacer que las flechas sean visibles e invisibles al presionar con la condición de que permanezca invisible si ya está del lado derecho o izquierdo hasta la condición cambios
  2. Quiero que la flecha izquierda sea invisible por defecto
  3. cuando se presiona la flecha derecha, la flecha derecha debe ser invisible mientras que la flecha izquierda se vuelve visible y viceversa
  4. sin embargo, no debería ser visible si presiona dos o tres veces la misma flecha
 const leftScrollHandler = () => { listViewRef.scrollToOffset({ offset: 0.5, animated: true }); }; const rightScrollHandler = () => { //OnCLick of right button we scrolled the list to bottom listViewRef.scrollToEnd({ animated: true }); }; // this below is for scroller to apear and disapear funtionality const [backgroundColor, setBackgroundColor] = useState("transparent"); const [backgroundColor2, setBackgroundColor2] = useState(colors.secondary); const [pressed, setPressed] = useState(false); function changeColor() { if (!pressed) { setPressed(true); setBackgroundColor(colors.secondary); setBackgroundColor2("transparent"); } else { setPressed(false); setBackgroundColor2(colors.secondary); setBackgroundColor("transparent"); } } <FlatList horizontal={true} showsHorizontalScrollIndicator={false} data={Data} keyExtractor={(item, index) => [item.id, index.toString()]} renderItem={renderItem} ref={(ref) => { listViewRef = ref; }} /> <TouchableOpacity activeOpacity={0.5} onPress={() => { changeColor(); leftScrollHandler(); }} style={ (web && isTablet) || isDesktop ? styles.leftScrollDesktop : styles.leftScroll } > <AntDesign style={styles.leftArrow} name="arrowleft" size={(web && isTablet) || isDesktop ? 50 : 35} color={backgroundColor} /> </TouchableOpacity> <TouchableOpacity activeOpacity={0.5} onPress={() => { changeColor(); rightScrollHandler(); }} style={ (web && isTablet) || isDesktop ? styles.rightScrollDesktop : styles.rightScroll } > <AntDesign style={styles.rightArrow} name="arrowright" size={(web && isTablet) || isDesktop ? 50 : 35} color={backgroundColor2} /> </TouchableOpacity>
about 4 years ago · Santiago Trujillo
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!