Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
What version of Activity are you using? Upgrading your Activity dependency 1.7.2
which also depends on Lifecycle 2.6.1
should resolve this.
ap...@google.com <ap...@google.com> #3
Thanks. I stumbled upon https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:activity/activity/src/main/java/androidx/activity/ComponentDialog.kt;bpv=1;bpt=0
And see it was fixed in commit 602bac6c67b589d11f8f4d1441a4aec4dca0ee49.
Ill wait to upgrade until after that commit is in the stable release.
And see it was fixed in commit 602bac6c67b589d11f8f4d1441a4aec4dca0ee49.
Ill wait to upgrade until after that commit is in the stable release.
mg...@google.com <mg...@google.com> #4
It is stable in the releases I referenced above.
ap...@google.com <ap...@google.com> #5
Fragment 1.6.1 will update the dependency of Activity to 1.7.2 so you'll get this improvement by default. As mentioned above, you can add a dependency on Activity 1.7.2 right now to fix the issue as a workaround until that release comes out.
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit d48a756bfcbc4679bbcf641554f75be5458cad04
Author: Ivan Matkov <ivan.matkov@jetbrains.com>
Date: Mon Mar 04 22:55:59 2024
Align source sets in lifecycle-runtime with JetBrains fork
- Move shared code into `nonJvmMain` (a common source set for native and web targets)
- Use expect/actual for `WeakReference` and `isMainThread`
Bug: 317249252
Test: N/A
Change-Id: If70f6aa691d231674a7e3234a668e4b8184f2d91
M development/build_log_simplifier/messages.ignore
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-runtime/src/nativeMain/kotlin/androidx/lifecycle/LifecycleRegistry.native.kt
A lifecycle/lifecycle-runtime/src/nativeMain/kotlin/androidx/lifecycle/WeakReference.native.kt
A lifecycle/lifecycle-runtime/src/nonJvmMain/kotlin/androidx/lifecycle/LifecycleRegistry.nonJvm.kt
A lifecycle/lifecycle-runtime/src/nonJvmMain/kotlin/androidx/lifecycle/WeakReference.nonJvm.kt
https://android-review.googlesource.com/2986215
Branch: androidx-main
commit d48a756bfcbc4679bbcf641554f75be5458cad04
Author: Ivan Matkov <ivan.matkov@jetbrains.com>
Date: Mon Mar 04 22:55:59 2024
Align source sets in lifecycle-runtime with JetBrains fork
- Move shared code into `nonJvmMain` (a common source set for native and web targets)
- Use expect/actual for `WeakReference` and `isMainThread`
Bug: 317249252
Test: N/A
Change-Id: If70f6aa691d231674a7e3234a668e4b8184f2d91
M development/build_log_simplifier/messages.ignore
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-runtime/src/nativeMain/kotlin/androidx/lifecycle/LifecycleRegistry.native.kt
A lifecycle/lifecycle-runtime/src/nativeMain/kotlin/androidx/lifecycle/WeakReference.native.kt
A lifecycle/lifecycle-runtime/src/nonJvmMain/kotlin/androidx/lifecycle/LifecycleRegistry.nonJvm.kt
A lifecycle/lifecycle-runtime/src/nonJvmMain/kotlin/androidx/lifecycle/WeakReference.nonJvm.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 1b02695fac60c198985910d0a4658a3f53027f35
Author: Ivan Matkov <ivan.matkov@jetbrains.com>
Date: Mon Mar 04 22:08:16 2024
Align source sets in lifecycle-common with JetBrains fork
- Move shared code into `nonJvmMain` (a common source set for native and web targets)
Bug: 317249252
Test: N/A
Change-Id: If7e05abc26e53d93f1b853941687602093576cc5
M lifecycle/lifecycle-common/build.gradle
M lifecycle/lifecycle-common/src/nonJvmMain/kotlin/androidx/lifecycle/Lifecycle.nonJvm.kt
M lifecycle/lifecycle-common/src/nonJvmMain/kotlin/androidx/lifecycle/Lifecycling.nonJvm.kt
https://android-review.googlesource.com/2986214
Branch: androidx-main
commit 1b02695fac60c198985910d0a4658a3f53027f35
Author: Ivan Matkov <ivan.matkov@jetbrains.com>
Date: Mon Mar 04 22:08:16 2024
Align source sets in lifecycle-common with JetBrains fork
- Move shared code into `nonJvmMain` (a common source set for native and web targets)
Bug: 317249252
Test: N/A
Change-Id: If7e05abc26e53d93f1b853941687602093576cc5
M lifecycle/lifecycle-common/build.gradle
M lifecycle/lifecycle-common/src/nonJvmMain/kotlin/androidx/lifecycle/Lifecycle.nonJvm.kt
M lifecycle/lifecycle-common/src/nonJvmMain/kotlin/androidx/lifecycle/Lifecycling.nonJvm.kt
pr...@google.com <pr...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-common:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-iosarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-iossimulatorarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-iosx64:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-jvm:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-linuxx64:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-macosarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-common-macosx64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-android:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-desktop:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-iosarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-iossimulatorarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-iosx64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-linuxx64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-macosarm64:2.8.0-alpha03
androidx.lifecycle:lifecycle-runtime-macosx64:2.8.0-alpha03
Description
It would be nice if the core concepts of Lifecycle would be available for use in Kotlin Multiplatform projects.
Libraries like the Navigation Component, Fragments, etc. have all settled on the same definitions of Lifecycle States, which seem to apply to any UI:
CREATED
- created, but not yet visibleSTARTED
- visible, but not yet settled (e.g., entering or exiting transitions may still be running)RESUMED
- visible and settledThis would include:
Lifecycle
LifecycleRegistry
LifecycleOwner
LifecycleObserver
And ideally everything in the
lifecycle-common
andlifecycle-runtime
artifacts.