Fixed
Status Update
Comments
jd...@xooloo.com <jd...@xooloo.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a071470cde57cf7eb6e39a67d331d716a0f8b842
Author: Ian Lake <ilake@google.com>
Date: Wed Jan 15 14:01:37 2020
Add SpecialEffectsController infrastructure
"Special Effects" is the blanket term for
Animation, Animator, framework Transition, and
AndroidX Transition that Fragments currently support.
Add the infrastructure around a SpecialEffectsController
which would operate on the container (i.e., ViewGroup)
level and coordinate all of the special effects.
This will eventually allow us to track the
postponed state at the container level.
Currently all APIs are purposefully package private
as they should not be used by external developers
at this time.
BUG: 147749580
Test: new test suites pass
Change-Id: I1e209bb4f55c21aa01afb49035d41f5b8d7d3eca
A fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
A fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
A fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsControllerFactory.java
M fragment/fragment/src/main/res/values/ids.xml
M jetifier/jetifier/migration.config
https://android-review.googlesource.com/1209367
Branch: androidx-master-dev
commit a071470cde57cf7eb6e39a67d331d716a0f8b842
Author: Ian Lake <ilake@google.com>
Date: Wed Jan 15 14:01:37 2020
Add SpecialEffectsController infrastructure
"Special Effects" is the blanket term for
Animation, Animator, framework Transition, and
AndroidX Transition that Fragments currently support.
Add the infrastructure around a SpecialEffectsController
which would operate on the container (i.e., ViewGroup)
level and coordinate all of the special effects.
This will eventually allow us to track the
postponed state at the container level.
Currently all APIs are purposefully package private
as they should not be used by external developers
at this time.
BUG: 147749580
Test: new test suites pass
Change-Id: I1e209bb4f55c21aa01afb49035d41f5b8d7d3eca
A fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
A fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
A fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsControllerFactory.java
M fragment/fragment/src/main/res/values/ids.xml
M jetifier/jetifier/migration.config
du...@google.com <du...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d990bffa6728272e139e1b5d58e764e9197b1adc
Author: Ian Lake <ilake@google.com>
Date: Thu Jan 16 14:05:14 2020
Find the appropriate SpecialEffectsControllerFactory
Instead of requiring each call to
getOrCreateController() require passing in the
factory, use findFragmentManager() to find the
containing FragmentManager and get the factory from
it.
Test: new test passes
BUG: 147749580
Change-Id: I44f747ba84feb2911a8d0811e40d1b46644429a5
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1210675
Branch: androidx-master-dev
commit d990bffa6728272e139e1b5d58e764e9197b1adc
Author: Ian Lake <ilake@google.com>
Date: Thu Jan 16 14:05:14 2020
Find the appropriate SpecialEffectsControllerFactory
Instead of requiring each call to
getOrCreateController() require passing in the
factory, use findFragmentManager() to find the
containing FragmentManager and get the factory from
it.
Test: new test passes
BUG: 147749580
Change-Id: I44f747ba84feb2911a8d0811e40d1b46644429a5
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
Description
I'm using a custom PagingSource backed by a SparseArray and a RemoteMediator to feed the SparseArray when more items are needed and invalidates the PagingSource.
With the alpha08 version of Paging, I was having the same bug as the one reported by 172000108, but the insertSeparators function was working fine (I'm just displaying a header before each item).
With the snapshot version, it is not crashing anymore, but the insertSeparators is not inserting a header before the first item in the list.
It seems to me that it is related to the new terminatesStart function in Separators.kt on CombinedLoadStates. When I use a PagingSource generated by Room, it returns true, and the headers are all displayed.
But with a remote mediator, it returns false, that's why the first header might not displayed.
My remote mediator is first called with loadType REFRESH then with PREPEND (i always return endOfPaginationReached = true for this case, as I only append items). So the mediator.prepend of CombinedLoadStates is eventually terminal (first NotLoading(endOfPaginationReached = false) then NotLoading(endOfPaginationReached = true).
But my PagingSource is never called with a params Prepend (I would return an empty list and both null for prev and next keys if it was called). So source.prepend is never terminal (always NotLoading(endOfPaginationReached = false).