简体   繁体   中英

Material Design 3 - Default text sizes for TopAppBars

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 ?

在此处输入图像描述

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.

There's a list of all the styles and their defaultshere :

  • 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM