-
-
Save KatieBarnett/6821b2ed7cd085aa26f7b7b967dccdbf to your computer and use it in GitHub Desktop.
Non resizing text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FontScalePreviews | |
@Composable | |
fun NonResizingTextPreview() { | |
ExperimentsTheme { | |
Box(modifier = Modifier.width(200.dp)) { | |
Text( | |
text = "This is non-resizing text with font scale ${LocalDensity.current.fontScale}", | |
fontSize = 16.sp.nonScaledSp | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment