docs: Document how to manage Material3 typography
Open
Nobody has claimed this yet.
documentation
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
To edit Android fonts, especially navigation titles and tab bar titles, you have to edit your Main.kt and edit typography settings there. This should be in the docs somewhere.
@Composable
internal fun PresentationRootView(context: ComposeContext) {
val colorScheme = if (isSystemInDarkTheme()) ColorScheme.dark else ColorScheme.light
val typography = androidx.compose.material3.Typography(
// nav title (large)
headlineLarge = androidx.compose.ui.text.TextStyle(
fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
),
// nav title (smaller)
headlineMedium = androidx.compose.ui.text.TextStyle(
fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
),
// tab title
labelMedium = androidx.compose.ui.text.TextStyle(
fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
)
)
androidx.compose.material3.MaterialTheme(typography = typography) {
PresentationRoot(defaultColorScheme = colorScheme, context = context) { ctx ->
val contentContext = ctx.content()
Box(modifier = ctx.modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
RootView().Compose(context = contentContext)
}
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Main.kt example in the issue and identify the repository's documentation location for Android and Material3 guidance. Document how the Typography settings control navigation and tab titles, including the shown headlineLarge, headlineMedium, and labelMedium examples; done means a newcomer can find and follow these instructions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- documentation, mobile
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100