Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

Follow publication

Typewriter animation in Jetpack Compose

Abhimanyu
Make Apps Simple
Published in
2 min readAug 15, 2022

Typewrite animation using Jetpack Compose based on Flutter animated_text_kit package.

Typewriter Animation UI

There are a lot of cool text animations in the Flutter animated_text_kit package. We are going to create the Typewriter animation using Jetpack Compose.

The basic logic is simple. Given a list of strings, loop through the strings and then create substrings from them increasing character by character.

This is how we will be using TypewriterText .

Let’s now see how TypewriterText is implemented.

Seems like we are done. But if you run this, you would see an issue.

Emoji issues

You can see that we see an unidentified character symbol before the emoji is displayed properly.

Unicode replacement character
Unicode replacement character

This is because emojis are made up of multiple characters.

Emoji Compatibility

To fix the emoji display, we can use .codePoints() from String in Kotlin.

Change the texts like this.

Note: codePoints() requires API level 24. So the emoji issue will be fixed only for API 24 and above devices.

Complete code

Please comment with your valuable feedback. It would help me to improvise.

Kindly 👏👏👏 if this was useful.

If you like this article and you would be interested to know more about other text animations, please follow.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Make Apps Simple
Make Apps Simple

Published in Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

Responses (2)

Write a response