swishy
01/31/2024, 11:01 PMPablichjenkov
02/01/2024, 5:18 AMPablichjenkov
02/01/2024, 5:20 AMswishy
02/01/2024, 5:22 AMIvan Matkov
02/01/2024, 11:41 AMandroidx.lifecycle.*
to use it as lifecycle state/events abstraction from common code, it will be available in next versions (not sure in which exactly at the moment)Pablichjenkov
02/01/2024, 3:09 PMMichael Paus
02/02/2024, 3:53 PMapplicationDidBecomeActive
and applicationDidEnterBackground
.Ivan Matkov
02/02/2024, 4:01 PMUIApplicationDelegate
with any required logicMichael Paus
02/02/2024, 7:13 PMfun MainViewController() = ComposeUIViewController(
configure = {
delegate = object: ComposeUIViewControllerDelegate {
override fun viewDidLoad() {
println("### viewDidLoad ###")
}
override fun viewDidAppear(animated: kotlin.Boolean) {
println("### viewDidAppear ###")
}
override fun viewDidDisappear(animated: kotlin.Boolean) {
println("### viewDidDisappear ###")
}
}
},
content = {
MaterialTheme {
App()
}
}
)
This took me a while to figure out because AndroidStudio reacts to it with an Internal Error.
But when I finally decided, as a last action, to just run it the compiler was actually happy and the app launched in the simulator printing the lines
### viewDidLoad ###
### viewDidAppear ###
I am wondering though why I never see a
### viewDidDisappear ###
even if I press the home button. Did I misunderstand the meaning of view did disappear?Pablichjenkov
02/02/2024, 7:17 PMswishy
02/02/2024, 7:18 PMswishy
02/02/2024, 7:18 PMPablichjenkov
02/02/2024, 7:19 PMMichael Paus
02/02/2024, 7:19 PMPablichjenkov
02/02/2024, 7:21 PMApple does bad APIs too
Michael Paus
02/02/2024, 7:28 PMPablichjenkov
02/02/2024, 7:34 PM