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

166
Vistas
Animate to scale down a view on scroll

in my react-native app when scroll position is higher than 0 I want to smoothly animate a circle view to be like 25% smaller:

transform: [{ scaleX: .8 }, { scaleY: .8 }]

when user scrolls back to top I want the circle to smoothly animate back to normal size:

//import * as React from 'react';
import { View, Animated, ScrollView } from 'react-native';
import React, { useState, useEffect,useRef } from 'react'


export default CustomScrollBarOverNormalScrollBar = (props) => 
{
    const onScroll = () =>
    {
        console.log('User scrolled');
    };

    return(
    <View style={{flex:1}}>
        <ScrollView showsVerticalScrollIndicator={false} scrollEventThrottle={16} style={{flex:1,backgroundColor:'white',position:'relative'}} 
            onScroll={onScroll}>
                <View style={{ width:'100%', height:700, backgroundColor:'rgb(235,235,235)' }}></View>
        </ScrollView>
        <View style={{width:'100%',height:100,position:'absolute',bottom:0,left:0, alignItems:'center',justifyContent:'center'}}>
            {/*TI WANT TO SCALE THIS CIRCLE*/}
            <View style={{ width:100,height:100,borderRadius:100%2,backgroundColor:'red' }}>  </View>
            {/*I WANT TO SCALE THIS CIRCLE*/}
        </View>
    </View>
    );    
};
about 4 years ago · Juan Pablo Isaza
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