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

Javier

01/05/2021, 6:23 PM
The usage of
android:configChanges
with some flags (
orientation
for example) will be the standard in the future? I think that Compose can manage better the responsibility. In case of an affirmative reply, extending the ViewModel should be useless?
🙌 2
s

Sinan Gunes

01/05/2021, 6:27 PM
Are you sure is ViewModel’s only responsibility is against orientation changes? What about
Do not keep activities
and even fragments?
j

Javier

01/05/2021, 6:35 PM
There will have only one activity, zero fragments
s

Sinan Gunes

01/05/2021, 6:37 PM
on an old project, before arch components, we had similar setup. ViewModels worked well then. but I see no point in avoiding it now.
j

Javier

01/05/2021, 6:41 PM
Yeah, but I am not talking about old code. I see no reason to use fragments with a new project which uses compose
I think @Adam Powell talked about this in another thread
a

Adam Powell

01/05/2021, 8:51 PM
ViewModel also has some saved instance state APIs for working with process restart, but compose has savedInstanceState APIs as well
👍 2
s

Shakil Karim

01/06/2021, 7:28 AM
@Javier I think for Compose only app, Animation while going from potrait to landscape should be achievable now.
8 Views