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

350
Visualizações
How to apply Blink animation on Checkbox text color

I have a blinking method, but this only works for the whole checkbox. I just want to blink the text inside the checkbox. Anyone know how to do this? And also, how can I change the text color when blinking?

Blink code:

fun View.blink(
        times: Int = Animation.INFINITE,
        duration: Long = 300L,
        offset: Long = 100L,
        minAlpha: Float = 0.0f,
        maxAlpha: Float = 1.0f,
        repeatMode: Int = Animation.REVERSE
    ) {
        startAnimation(AlphaAnimation(minAlpha, maxAlpha).also {
            it.duration = duration
            it.startOffset = offset
            it.repeatMode = repeatMode
            it.repeatCount = times
        })
    }

and then in the checkbox:

checkBoxText.blink(3)
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can animate the textColor, it will not affect the box. Here is example to blink the red text

val colorAnimator = ObjectAnimator.ofInt(
    myCheckBox,
    "textColor",
    Color.argb(255, 255, 0, 0), Color.argb(0, 255, 0, 0)
)
colorAnimator.setEvaluator(ArgbEvaluator())
colorAnimator.repeatCount = 3
colorAnimator.duration = 2000
colorAnimator.start()
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