Android Programming: The Big Nerd Ranch Guide, 5th Edition
by Bryan Sills, Brian Gardner, Kristin Marsicano, Chris Stewart
For the More Curious: Live Literals
In addition to previews, Jetpack Compose has several tricks up its sleeve to let you quickly iterate on UI designs. One of these is a feature called live literals. When live literals are enabled and you run your Compose app through Android Studio, any changes you make to hardcoded values (“literals”) in your Compose UI will automatically be pushed to the app as it is running. Your UI will refresh with new values as they are typed, letting you preview changes instantly, without recompiling.
Live literals only work for simple hardcoded values like Int, Boolean, and String. They also must be enabled in the IDE. To check if you have live literals enabled, open Android Studio’s preferences with Android ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access