Status Update
Comments
yb...@google.com <yb...@google.com> #2
Branch: androidx-master-dev
commit baaf6845487edfe94fb470730d35f1f9cfbae190
Author: Hai Zhang <zhanghai@google.com>
Date: Tue Oct 01 11:58:25 2019
Fix FastScroller when layout direction is RTL.
The canvas needs to be mirrored again to restore its scaling, and the
touchable width for RTL thumb should still be its full width instead
of only the left half.
Fixes: 143789932
Test: Manually verified
Change-Id: I89d3aa1945038d915d3c9f4ef5dd01120e6d0c3f
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/FastScroller.java
sh...@google.com <sh...@google.com> #3
Some option ideas:
- AdapterCombiner
- CombinedAdapter
- CombiningAdapter
- AdapterMerger
- SequentialAdapter
- AdapterSequence
- ChainAdapter
- AdapterChainer
- AdapterChain
I kind of like ConcatenationAdapter. Though honestly, I wonder if every name is going to be initially confusing to readers, and ultimately MergeAdapter might still be best.
cc...@google.com <cc...@google.com> #4
I think Concat
/ Concatenation
is by far the clearest. MergeAdapter makes my mind go immediately to merge sort, which is not what this adapter does.
ku...@gmail.com <ku...@gmail.com> #5
I personally think the name MergeAdapter is fine. My team created this exact abstraction years ago, and independently named that class "MergeAdapter". Though obviously since I have already made this connection for years; I am bias.
The fact that "MergeAdapter" reminds us of "MergeSort" reminds of "interleaving behavior" is quite a few mental hops. I think we'd all be better off by trying to disassociate that, and instead treat all words by their actual definition.
The bad part about naming this something much more specific like "ConcatenationAdapter", is that those definitions are a bit narrowly scoped. A nice thing you can accomplish with the "MergeAdapter" API is you can add and remove adapters in the middle of the list dynamically to render "collapsible" and "expandable" items or lists. I don't think the term "concatenate" captures this behavior very well, but I do think the word "merge" is broad enough to convey this.
ap...@google.com <ap...@google.com> #6
Branch: androidx-master-dev
commit a678d10f76e2c1da8f6857538474fbf87f919ed0
Author: Yigit Boyar <yboyar@google.com>
Date: Tue Jun 02 18:09:39 2020
Rename merge adapter to concat adapter
Bug: 158019211
Test: existing tests
Change-Id: I71dbfc22d4c757cdc2c94ec25fc9a9b780431c2c
M paging/runtime/api/3.0.0-alpha02.txt
M paging/runtime/api/current.txt
M paging/runtime/api/public_plus_experimental_3.0.0-alpha02.txt
M paging/runtime/api/public_plus_experimental_current.txt
M paging/runtime/api/restricted_3.0.0-alpha02.txt
M paging/runtime/api/restricted_current.txt
M paging/runtime/build.gradle
M paging/runtime/src/main/java/androidx/paging/LoadStateAdapter.kt
M paging/runtime/src/main/java/androidx/paging/PagedListAdapter.kt
M paging/runtime/src/main/java/androidx/paging/PagingDataAdapter.kt
M recyclerview/recyclerview/api/1.2.0-alpha04.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_1.2.0-alpha04.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_1.2.0-alpha04.txt
M recyclerview/recyclerview/api/restricted_current.txt
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ConcatAdapterSubject.kt
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ConcatAdapterTest.kt
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapter.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapterController.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/NestedAdapterWrapper.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/StableIdStorage.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ViewTypeStorage.java
yb...@google.com <yb...@google.com>
ad...@google.com <ad...@google.com> #7
Years ago the term MergeAdapter was common for ListViews, but that was before other APIs like RxJava and Flow entered the common Android development lexicon and brought along much more precise definitions of these terms. These APIs build very strong distinctions between interleave (merge) and strict ordered sequence of groups (concat) and we benefit from consistency with the more contemporary usage here, especially when these APIs are often used in close proximity to one another.
Normally we try to encourage spelling out terms in API rather than abbreviating, but concat
is a special case here. String
, Rx and others standardized on concat
so long ago that many people aren't even familiar with the fully expanded term; better to be consistent with the ecosystem here.
ap...@google.com <ap...@google.com> #8
Branch: androidx-master-dev
commit c0540c10cc7ea5027d3fc3b22024de7e66c41a9d
Author: Yigit Boyar <yboyar@google.com>
Date: Tue Jun 02 18:38:41 2020
ConcatAdapter API improvements
Accept extends bound in constructor arguments
Make Config & Config.Builder final
Bug: 158019211
Test: existing tests
Change-Id: I60bc0da651935b35a4dd64a0117aae532a278452
M recyclerview/recyclerview/api/1.2.0-alpha04.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_1.2.0-alpha04.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_1.2.0-alpha04.txt
M recyclerview/recyclerview/api/restricted_current.txt
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/ConcatAdapter.java
Description
Comment on Florina's blogpost (https://medium.com/p/294d2942127a ) mentioned that the name made it sound like it could interleave items, and I recently saw someone else make the same wrong assumption elsewhere.
Something like SequenceAdapter or ConcatAdapter or similar may be clearer.