Typography
public static class Typography
Class holding typography definitions as defined by the Wear Material3 typography specification.
Note that, on API 36 and above, typography styles changes slightly to better accommodate layouts being in the system font defined by each device.
Summary
Constants |
|
|---|---|
static final int |
BODY_EXTRA_SMALL = 2BodyExtraSmall is the smallest body. |
static final int |
BODY_LARGE = 3BodyLarge is the largest body. |
static final int |
BODY_MEDIUM = 4BodyMedium is second largest body. |
static final int |
BODY_SMALL = 5BodySmall is third largest body. |
static final int |
DISPLAY_LARGE = 6DisplayLarge is the largest headline. |
static final int |
DISPLAY_MEDIUM = 7DisplayMedium is the second largest headline. |
static final int |
DISPLAY_SMALL = 8DisplaySmall is the smallest headline. |
static final int |
LABEL_LARGE = 9LabelLarge is the largest label. |
static final int |
LABEL_MEDIUM = 10LabelMedium is the medium label. |
static final int |
LABEL_SMALL = 11LabelSmall is the small label. |
static final int |
NUMERAL_EXTRA_LARGE = 12NumeralsExtraLarge is the largest role for digits. |
static final int |
NUMERAL_EXTRA_SMALL = 13NumeralsExtraSmall is the smallest role for digits. |
static final int |
NUMERAL_LARGE = 14NumeralsLarge is the second largest role for digits. |
static final int |
NUMERAL_MEDIUM = 15NumeralsMedium is the third largest role for digits. |
static final int |
NUMERAL_SMALL = 16NumeralsSmall is the fourth largest role for digits. |
static final int |
TITLE_LARGE = 17TitleLarge is the largest title. |
static final int |
TITLE_MEDIUM = 18TitleMedium is the medium title. |
static final int |
TITLE_SMALL = 19TitleSmall is the smallest title. |
Public fields |
|
|---|---|
static @NonNull Typography |
Constants
BODY_EXTRA_SMALL
public static final int BODY_EXTRA_SMALL = 2
BodyExtraSmall is the smallest body. Body texts are typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.
BODY_LARGE
public static final int BODY_LARGE = 3
BodyLarge is the largest body. Body texts are typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.
BODY_MEDIUM
public static final int BODY_MEDIUM = 4
BodyMedium is second largest body. Body texts are typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.
BODY_SMALL
public static final int BODY_SMALL = 5
BodySmall is third largest body. Body texts are typically used for long-form writing as it works well for small text sizes. For longer sections of text, a serif or sans serif typeface is recommended.
DISPLAY_LARGE
public static final int DISPLAY_LARGE = 6
DisplayLarge is the largest headline. Displays are the largest text on the screen, reserved for short, important text.
DISPLAY_MEDIUM
public static final int DISPLAY_MEDIUM = 7
DisplayMedium is the second largest headline. Displays are the largest text on the screen, reserved for short, important text.
DISPLAY_SMALL
public static final int DISPLAY_SMALL = 8
DisplaySmall is the smallest headline. Displays are the largest text on the screen, reserved for short, important text.
LABEL_LARGE
public static final int LABEL_LARGE = 9
LabelLarge is the largest label. They are used for displaying prominent texts like label on title buttons.
LABEL_MEDIUM
public static final int LABEL_MEDIUM = 10
LabelMedium is the medium label. They are used for displaying texts like primary label on buttons.
LABEL_SMALL
public static final int LABEL_SMALL = 11
LabelSmall is the small label. They are used for displaying texts like secondary label on buttons, labels on compact buttons.
NUMERAL_EXTRA_LARGE
public static final int NUMERAL_EXTRA_LARGE = 12
NumeralsExtraLarge is the largest role for digits. Numerals use tabular spacing by default. They highlight and express glanceable numbers that are limited to a two or three characters only, where no localization is required like the charging screen.
NUMERAL_EXTRA_SMALL
public static final int NUMERAL_EXTRA_SMALL = 13
NumeralsExtraSmall is the smallest role for digits. Numerals use tabular spacing by default. They are for numbers that need to accommodate longer strings of digits, where no localization is required like in-workout metrics.
NUMERAL_LARGE
public static final int NUMERAL_LARGE = 14
NumeralsLarge is the second largest role for digits. Numerals use tabular spacing by default. They are large sized number strings that are limited to big displays of time, where no localization is required like a timer countdown.
NUMERAL_MEDIUM
public static final int NUMERAL_MEDIUM = 15
NumeralsMedium is the third largest role for digits. Numerals use tabular spacing by default. They are medium sized numbers that are limited to short strings of digits, where no localization is required like a steps count.
NUMERAL_SMALL
public static final int NUMERAL_SMALL = 16
NumeralsSmall is the fourth largest role for digits. Numerals use tabular spacing by default. They are for numbers that need emphasis at a smaller scale, where no localization is required like date and time pickers.
TITLE_LARGE
public static final int TITLE_LARGE = 17
TitleLarge is the largest title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.
TITLE_MEDIUM
public static final int TITLE_MEDIUM = 18
TitleMedium is the medium title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.
TITLE_SMALL
public static final int TITLE_SMALL = 19
TitleSmall is the smallest title. Titles are smaller than Displays. They are typically reserved for medium-emphasis text that is shorter in length.