Fixed
Status Update
Comments
t....@gmail.com <t....@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 428f0ec685ff80035c0511c0cdb12b9770b6159c
Author: Maxim Savoskin <maximsavoskin@gmail.com>
Date: Mon Mar 29 13:20:52 2021
[GH] [Lifecycle] [Lint] fixes b/183696616 : KtCallExpression is not always the first in the list
## Proposed Changes
KtCallExpression is not always the first in the list. In this case, it is KtModifierList.
## Testing
Test: ./gradlew test lint buildOnServer
## Issues Fixed
Fixes:https://issuetracker.google.com/issues/183696616
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/147 .
Resolves #147
Github-Pr-Head-Sha: 3c2693e2f4cceb367c9c169749d1391a9da2740f
GitOrigin-RevId: a6440720029b1c0c702207f1393d3b01180691b8
Change-Id: I9b4383329b9ece85e3bffa4a9bf8e8a3f0c3d84a
M lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
M lifecycle/lifecycle-livedata-core-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
https://android-review.googlesource.com/1656820
Branch: androidx-main
commit 428f0ec685ff80035c0511c0cdb12b9770b6159c
Author: Maxim Savoskin <maximsavoskin@gmail.com>
Date: Mon Mar 29 13:20:52 2021
[GH] [Lifecycle] [Lint] fixes
## Proposed Changes
KtCallExpression is not always the first in the list. In this case, it is KtModifierList.
## Testing
Test: ./gradlew test lint buildOnServer
## Issues Fixed
Fixes:
This is an imported pull request from
Resolves #147
Github-Pr-Head-Sha: 3c2693e2f4cceb367c9c169749d1391a9da2740f
GitOrigin-RevId: a6440720029b1c0c702207f1393d3b01180691b8
Change-Id: I9b4383329b9ece85e3bffa4a9bf8e8a3f0c3d84a
M lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
M lifecycle/lifecycle-livedata-core-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
il...@google.com <il...@google.com> #4
Will you guys be releasing a hot fix 2.3.2 for this?
t....@gmail.com <t....@gmail.com> #5
Any updates about when this is going live?
il...@google.com <il...@google.com> #6
Hi, I hate to keep posting same comments, but are there any plans to release this fix? It's blocking us from updating to fragment 1.3.2+.
t....@gmail.com <t....@gmail.com> #7
D
si...@gmail.com <si...@gmail.com> #8
How do you update components that are viewed through the chrome.url page of they all indicate that they are not up to date
il...@google.com <il...@google.com> #9
Also my phone was in the hands of a skilled IT individual, how can I verify what, if any, modifications took place. I cannot enter recovery mode on my device....
t....@gmail.com <t....@gmail.com> #10
Excellent. Thanks so much!
sm...@gmail.com <sm...@gmail.com> #11
I'm experiencing a similiar issue with version 1.3.1. I wrote some instrumented tests using androidx.fragment:fragment-testing:1.2.5 which are supposed to simulate Fragment being minimized (home button) and brought back again. I perform that by calling FragmentScenario.moveToState() to go RESUMED -> CREATED -> RESUMED. With 1.2.5 everything was fine, but after upgrade to 1.3.1 these tests started failing due to onCreateView() being called twice. I've described my problem with greater detail on SO https://stackoverflow.com/questions/66629817/testing-androidx-fragment-lifecycle-by-stopping-and-resuming-with-fragmentscenar .
This issue is already fixed in 1.3.1, so this probably is a problem in my configuration. Or maybe it's a regression ? It'd be helpful if someone experienced in this topic would take a look. I could provide sample project reproducing the issue on github if needed.
This issue is already fixed in 1.3.1, so this probably is a problem in my configuration. Or maybe it's a regression ? It'd be helpful if someone experienced in this topic would take a look. I could provide sample project reproducing the issue on github if needed.
il...@google.com <il...@google.com> #12
Re #11 - going from RESUMED
-> CREATED
will destroy your view (the CREATED
state is the state immediately after onCreate()
- i.e., before onCreateView()
), moving back to up RESUMED
will recreate the View. It sounds like Fragment 1.3.1 is working as intended.
Description
Version used:
androidx.navigation:navigation-fragment-ktx:2.2.0-rc01
androidx.navigation:navigation-ui-ktx:2.2.0-rc01
Devices/Android versions reproduced on:
Pixel 3
Android 10
When switching tabs (using BottomNavigation / setupWithNavController()), when the destination Fragment contains a call to postponeEnterTransition() in onCreate() or onCreateView(), the onCreateView() lifecycle method gets called twice. This behavior is visible to the user, via a sort of 'flicker' (depending on the layout), as the fragment's view is recreated.
I suspect this may be due to some code in
`FragmentManager.addAddedFragments(@NonNull ArraySet<Fragment> added)`
It appears the destination Fragment (which invoked postponeEnterTransition()) has moveToState() called on it twice (vie addAddedFragments()). My guess, is that the destination fragment hasn't completed its first moveToState() before the second moveToState() is called, so the secondMoveToState() is attempting to move from a stale state.
I'm not able to provide a sample project for you at this stage.