Fixed
Status Update
Comments
du...@google.com <du...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b3af8650cc51d87063c9cd814b32144bfa48bc8b
Author: jbwoods <jbwoods@google.com>
Date: Thu Apr 11 14:17:02 2019
Implement FragmentTransaction methods in the class
Split the FragmentTransaction methods out of BackStackRecord and back
into FragmentTransaction to create a layer of separation between the
manipulation and the execution of Operations.
Moving the implementation to FragmentTransaction means new operations
can be added without the need to create empty methods in
FragmentTransactions.
Test: ran fragment tests, ./gradlew checkApi
Bug: 129780800
Change-Id: If352280983fa798eafa6aa41162e4b7d24106ecb
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransaction.java
https://android-review.googlesource.com/943726
https://goto.google.com/android-sha1/b3af8650cc51d87063c9cd814b32144bfa48bc8b
Branch: androidx-master-dev
commit b3af8650cc51d87063c9cd814b32144bfa48bc8b
Author: jbwoods <jbwoods@google.com>
Date: Thu Apr 11 14:17:02 2019
Implement FragmentTransaction methods in the class
Split the FragmentTransaction methods out of BackStackRecord and back
into FragmentTransaction to create a layer of separation between the
manipulation and the execution of Operations.
Moving the implementation to FragmentTransaction means new operations
can be added without the need to create empty methods in
FragmentTransactions.
Test: ran fragment tests, ./gradlew checkApi
Bug: 129780800
Change-Id: If352280983fa798eafa6aa41162e4b7d24106ecb
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransaction.java
du...@google.com <du...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a6c8bc7b1d821496ae8cad896566b7d334336a27
Author: jbwoods <jbwoods@google.com>
Date: Fri Apr 12 15:38:15 2019
Set max Lifecycle for a Fragment
Added FragmentTransaction API to allow Fragment Lifecycle states to be
capped at a lower Lifecycle than FragmentManager or Activity. Passing
Lifecycle.State.RESUMED effectively removes any restriction. If the
transactions are added and popped off of the FragmentManager back stack,
the max Lifecycle state returns to the previous value.
Test: new tests. Ran Fragment tests
./gradlew checkApi
BUG: 129780800
Change-Id: I20735b88ed78735894ace9ae68a1287c6235dfdc
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/androidTest/java/androidx/fragment/app/BackStackStateTest.kt
M fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.kt
M fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/src/main/java/androidx/fragment/app/BackStackState.java
M fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/src/main/java/androidx/fragment/app/FragmentManagerImpl.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransaction.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
https://android-review.googlesource.com/942528
https://goto.google.com/android-sha1/a6c8bc7b1d821496ae8cad896566b7d334336a27
Branch: androidx-master-dev
commit a6c8bc7b1d821496ae8cad896566b7d334336a27
Author: jbwoods <jbwoods@google.com>
Date: Fri Apr 12 15:38:15 2019
Set max Lifecycle for a Fragment
Added FragmentTransaction API to allow Fragment Lifecycle states to be
capped at a lower Lifecycle than FragmentManager or Activity. Passing
Lifecycle.State.RESUMED effectively removes any restriction. If the
transactions are added and popped off of the FragmentManager back stack,
the max Lifecycle state returns to the previous value.
Test: new tests. Ran Fragment tests
./gradlew checkApi
BUG: 129780800
Change-Id: I20735b88ed78735894ace9ae68a1287c6235dfdc
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/androidTest/java/androidx/fragment/app/BackStackStateTest.kt
M fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.kt
M fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/src/main/java/androidx/fragment/app/BackStackState.java
M fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/src/main/java/androidx/fragment/app/FragmentManagerImpl.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransaction.java
M fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a24863fab1958f10c3791f0dbf612862c972be21
Author: jbwoods <jbwoods@google.com>
Date: Wed Apr 17 10:09:32 2019
Save fragment maxState on save and restore
Added mMaxState to fragmentState.
Test: Added test and reran Fragment tests
BUG: 129780800
Change-Id: Ibbe023668043e82078aa7fd97e0fd233457972f8
M fragment/src/androidTest/java/androidx/fragment/app/SaveStateFragmentTest.kt
M fragment/src/main/java/androidx/fragment/app/FragmentState.java
https://android-review.googlesource.com/946700
https://goto.google.com/android-sha1/a24863fab1958f10c3791f0dbf612862c972be21
Branch: androidx-master-dev
commit a24863fab1958f10c3791f0dbf612862c972be21
Author: jbwoods <jbwoods@google.com>
Date: Wed Apr 17 10:09:32 2019
Save fragment maxState on save and restore
Added mMaxState to fragmentState.
Test: Added test and reran Fragment tests
BUG: 129780800
Change-Id: Ibbe023668043e82078aa7fd97e0fd233457972f8
M fragment/src/androidTest/java/androidx/fragment/app/SaveStateFragmentTest.kt
M fragment/src/main/java/androidx/fragment/app/FragmentState.java
du...@google.com <du...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c37223a1b4512f1d34e100d2e521062dbad028d7
Author: jbwoods <jbwoods@google.com>
Date: Tue Apr 16 13:39:38 2019
Deprecate setUserVisibleHint()
We the addition of the setMaxLifecycle() Api in FragmentTransactions,
setUserVisibleHint() can be deprecated.
Deprecate setUserVisibleHint() method in fragments and marking all
usages (only used in FragmentPagerAdapter and
FragmentStatePagerAdapter) with SuppressWarnings("deprecated").
Test: ran Fragment Test
./gradlew checkApi
BUG: 129780800
Change-Id: I3d99991eb33dfc65d4b79efe566b54d0adce9d68
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/androidTest/java/androidx/fragment/app/NestedInflatedFragmentTest.kt
M fragment/src/androidTest/java/androidx/fragment/app/SaveStateFragmentTest.kt
M fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/src/main/java/androidx/fragment/app/FragmentPagerAdapter.java
M fragment/src/main/java/androidx/fragment/app/FragmentStatePagerAdapter.java
https://android-review.googlesource.com/945776
https://goto.google.com/android-sha1/c37223a1b4512f1d34e100d2e521062dbad028d7
Branch: androidx-master-dev
commit c37223a1b4512f1d34e100d2e521062dbad028d7
Author: jbwoods <jbwoods@google.com>
Date: Tue Apr 16 13:39:38 2019
Deprecate setUserVisibleHint()
We the addition of the setMaxLifecycle() Api in FragmentTransactions,
setUserVisibleHint() can be deprecated.
Deprecate setUserVisibleHint() method in fragments and marking all
usages (only used in FragmentPagerAdapter and
FragmentStatePagerAdapter) with SuppressWarnings("deprecated").
Test: ran Fragment Test
./gradlew checkApi
BUG: 129780800
Change-Id: I3d99991eb33dfc65d4b79efe566b54d0adce9d68
M fragment/api/1.1.0-alpha07.txt
M fragment/api/current.txt
M fragment/src/androidTest/java/androidx/fragment/app/NestedInflatedFragmentTest.kt
M fragment/src/androidTest/java/androidx/fragment/app/SaveStateFragmentTest.kt
M fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/src/main/java/androidx/fragment/app/FragmentPagerAdapter.java
M fragment/src/main/java/androidx/fragment/app/FragmentStatePagerAdapter.java
Description
Version used: 3.0.0-alpha01
I'm trying to replace my old PagedListAdapters with the new PagingDataAdapter.
Using the RecyclerView selection tracker library I need to implement an ItemKeyProvider which has two methods :
getKey(position: Int) and getPosition(key: String).
For the first one I can retrieve the key by calling adapter.getItem(position) but for the second one the PagingDataAdapter doesn't expose the list of items or any method to get the position of an item (like adapter.getposition(item)).
With the PagedListAdapter I was exposing the list by overriding submitList() and making a copy of the list (I don't know if it was a good solution though) but I can't do it with the new adapter as the submitData method is not open.
Is there already a solution that I don't know about or should the PagingDataAdapter exposing a method?