Type Animation Implementation on Android TextView in kotlin

Job ID: 38779287

Budget: $30 – $250 USD

I'm looking for an Android developer who can implement type animations on a TextView. The class will take the TextView as a parameter and run the type animations on it.

Video: https://drive.google.com/file/d/1SEk4lMZJ3tdyn-F7Muv81RDpoNN3Xu-e/view

Swift code attached.

Customizable inputs:
- Write speed
- Erase speed
- Delays
- bar character (|)
- bar flash speed

IMPORTANT: I also want to receive a delegate calls when certain action starts (starts writing certain word, delay is occurring or erasing starts). So I can (as you can see on the video) act accordingly when it happens - in this case, animate the flag change. The flag is a completely different view, it has nothing to do with the task.

Demonstrate it by sending me a video of it working. If it works, send me a piece of code for the animator class.

Example swift code:

let helloWords: [(word: String, flag: String)] = [
           ("hola", "ES"),      // Spanish - Spain
           ("здраво", "RS"),    // Serbian - Serbia
           ("bonjour", "FR"),   // French - France
           ("γεια", "GR"),      // Greek - Greece
           ("hallo", "DE"),     // German - Germany
           ("你好", "CN"),      // Chinese - China
           ("olá", "PT"),       // Portuguese - Portugal
           ("नमस्ते", "IN"),    // Hindi - India
           ("привет", "RU"),    // Russian - Russia
           ("ahoj", "CZ"),      // Czech - Czech Republic
           ("merhaba", "TR"),   // Turkish - Turkey
           ("здравейте", "BG"), // Bulgarian - Bulgaria
           ("buna ziua", "RO"), // Romanian - Romania
           ("szia", "HU"),      // Hungarian - Hungary
           ("привіт", "UA"),    // Ukrainian - Ukraine
           ("hej", "SE"),       // Swedish - Sweden
           ("zdravo", "HR"),    // Croatian - Croatia
           ("cześć", "PL"),     // Polish - Poland
           ("hei", "NO"),       // Norwegian - Norway
           ("labas", "LT"),     // Lithuanian - Lithuania
           ("g’day", "AU"),     // Australian English - Australia
           ("sveiki", "LV"),    // Latvian - Latvia
           ("안녕", "KR"),      // Korean - South Korea
           ("ciao", "IT"),      // Italian - Italy
           ("こんにちは", "JP"), // Japanese - Japan
           ("hello", "GB")      // English - United Kingdom
       ]

let animator = LabelTypingAnimator(label: labelHello)
       animator.delegate = self

       for item in helloWords {
           animator.animate(.delay(duration: delayBeforeErasing))
               .animate(.eraseAll)
               .animate(.delay(duration: delayBeforeWriting))
               .animate(.write(text: item.word))
       }

       animateImageChange(flagCode: "gb", duration: 0)
       labelHello.adjustsFontSizeToFitWidth = true

       // set initial state
       labelHello.text = "hello"

       animator
           .loop(true)
           .start()
}
Delegate call example:

extension AuthViewController: LabelTypingAnimatorDelegate {
   func animator(_ animator: LabelTypingAnimator, notification: LabelTypingAnimator.DelegateNotification) {
       switch notification {
       case let .started(animation):
           switch animation {
               case let .write(text):
               if let index = self.helloWords.firstIndex(where: { return $0.word == text }) {
                   let flag = self.helloWords[index].flag
                   self.animateImageChange(flagCode: flag)
               }
           default:
               break
           }
       default:
           break
       }
   }
}