What default text sizes are used for the CenterAlignedTopAppBar
, SmallTopAppBar
, MediumTopAppBar
and LargeTopAppBar
in Material Design 3? Are these sizes specified in dp
or sp
?
CodePudding user response:
App bar and their height
LargeTopAppBar -> 152.0.dp
MediumTopAppBar -> 112.0.dp
SmallTopAppBar -> 64.0.dp
CenterAlignedTopAppBar -> 64.0.dp
Source:
TopAppBarSmallTokens.kt
, TopAppBarMediumTokens.kt
and TopAppBarLargeTokens.kt
source code.
CodePudding user response:
There's a list of all the styles and their defaults here:
- textAppearanceTitleLarge: Regular 22sp
- textAppearanceHeadlineSmall: Regular 24sp
- textAppearanceHeadlineMedium: Regular 28sp
Outside of specific situations where you want a fixed, consistent size, text size is always defined in sp so it can scale to the user's preferences, and maintain the size relationship between different types of text