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

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

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 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!