See how to use Compose APIs specifically designed to draw text on a canvas. This segment shows the code to draw an emoji font in a rounded rectangle.
Key points
- In Compose, you can draw text on a canvas by creating a text measure and
calling
drawText
, resulting in the measuring string. - You can also customize the text size, alignment, and other properties.
Collections that contain this guide
This guide is part of these curated Quick Guide collections that cover broader Android development goals:
Display text
Text is a central piece of any UI. Find out different ways
you can present text in your app to provide a delightful user
experience.
Display images
Discover techniques for using bright, engaging visuals to
give your Android app a beautiful look and feel.
Have questions or feedback
Go to our frequently asked questions page and learn about quick guides or reach out and let us know your thoughts.