https://kotlinlang.org logo
#compose
Title
# compose
o

oday

08/21/2022, 12:48 PM
I seem to have something misunderstood here, we’re still using Activities and Fragments yes? I mean it’s not just 1 Activity where you switch out composables to display content for example I have the MainActivity here showing either Authentication Composable or Home Composable depending on whether the user is logged in or not .. I think I should be opening the HomeActivity instead and inside set the content to Home
a

Advitiay Anand

08/21/2022, 12:51 PM
You could do either of those. Depends on what's the easiest to implement in your current architecture. The compose-only way does simplify things imo. It's not a necessity tho.
c

Colton Idle

08/22/2022, 3:46 AM
I had one app that I converted from multi activity, to single activity + multiple fragments. Then each fragment became an empty fragment that hosted a composable screen. then i got rid of fragments and am doing 1 activity multiple composables.
d

deviant

08/26/2022, 11:32 AM
i'd recommend to get rid of fragments and go fully with composables in 1 activity
c

Colton Idle

08/26/2022, 10:25 PM
if possible. then yeah. definitely. im just explaining our incremental approach.
6 Views