myanmarking
01/21/2022, 3:57 PMLocalContext.current
is not returning me the fragment context. Is there a way to get it, without passing the context explicitly?myanmarking
01/21/2022, 4:03 PMCasey Brooks
01/21/2022, 4:10 PMContext
like an Activity
does, so LocalContext
will never give you a reference to a Fragment.myanmarking
01/21/2022, 4:12 PMAdam Powell
01/21/2022, 8:18 PMLocalContext
- it comes from the view, so it should be whatever context you've used to construct the view: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]tionLocals.android.kt;l=116?q=ProvideAndroidCompositionLocalsmyanmarking
01/21/2022, 8:19 PM