0

In a glance Text(), there's a style attribute, and this takes a glance TextStyle.

This TextStyle is different to the TextStyle you use in your MaterialTheme. So you can't reuse your app's TextStyles.

Is it possible to reuse your app's TextStyles in a glance app widget?

mmm111mmm
  • 3,607
  • 4
  • 27
  • 44

1 Answers1

2

Note that MaterialTheme is designed for Jetpack Compose UI elements not for Glance. Given the limitations of AppWidgets (i.e no custom fonts) I would avoid reusing the theme.

We are working on a "theming" API for Glance, in the meantime you can keep the TextStyle as top-level variable and reuse it when needed.

Marcel
  • 2,094
  • 3
  • 23
  • 37