https://kotlinlang.org logo
a

Ali Zargar Shabestari

09/09/2020, 5:47 PM
is there any wrapper for fragment to use in compose? my goal is to use a
PreferenceFragmentCompat
without rewriting the logic it provides for free.
or is there a xml-free method for managing preferences?
m

Mark Murphy

09/09/2020, 10:53 PM
once the Navigation component supports Compose, you could just create your
PreferenceFragmentCompat
as normal, add it to the appropriate nav graph, and navigate to it from the appropriate composable
a

Ali Zargar Shabestari

09/10/2020, 4:58 AM
I think it is already possible to wrap Compose code inside fragment and use that fragment inside nav graph. However, I’m using code inspired by the nav code from the Owl sample app for navigation which in my humble opinion is less complicated than Navigation component.