Join Slack
Powered by
Hey, how can I access displayMetrics in compose to...
# compose
s
Sheroz Nazhmudinov
05/02/2020, 2:12 PM
Hey, how can I access displayMetrics in compose to get the screen density?
m
manueldidonna
05/02/2020, 2:15 PM
Check Wrapper.kt in ui-core that contains all the ambients provided by default. There is a Context ambient and a Density one
s
Sheroz Nazhmudinov
05/02/2020, 2:17 PM
👍 thank you!
👍 1
k
Klaas Kabini
05/02/2020, 4:24 PM
val density = DensityAmbient.current
👍 1
15
Views
Open in Slack
Previous
Next