How to load `TextUnit` from Android XML resources...
# compose
a
How to load
TextUnit
from Android XML resources?
dimensionResource(...)
works great for
dp
is there an equivalent for
sp
? 🤔
✅ 1
a
Just convert it to sp:
with(LocalDensity.current) { dimensionResource(R.dimen.text_size).toSp() }
a
Hmm, not bad, would have expected similar API to dimensionResource 🙂
âž• 1