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

800
Visualizações
Animating the border radius in React Native

I'm unable to animate the borderRadius property in a ReactNative Image, it seems to only re-render the image as the animation completes. It fades out on animation start, and fades back in on animation completion. This only happens on Android; on iOS the animation plays properly.

I am trying to animate a circle expanding into a square by animating the borderRadius:

constructor(props) {
    super(props);
    this.state = {
        borderRadius: new Animated.Value(ALBUM_CIRCLE_DIAMETER /2)
    };
}

_zoomIn = () => {
    Animated.timing(
        this.state.borderRadius,
        {
            toValue: 0,
            duration: ZOOM_ANIMATION_DURATION_MS,
            easing: Easing.linear
        }
    ).start()
}

And the markup:

<Animated.Image
    style={[
        styles.albumArtCircle,
        { width: this.state.albumArtWidth },
        { height: this.state.albumArtHeight },
        { borderRadius: this.state.borderRadius },
    ]}
    resizeMode='contain'
    source={require('../images/sampleAlbum.jpg')}>
</Animated.Image>
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Right! Remove resizeMode property. This will solve your problem

over 4 years ago · Santiago Trujillo Relatório

0

Removing resizeMode='contain' made this work.

over 4 years ago · Santiago Trujillo 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