commit | 154862942cc272a3da880406dd0751688a003a76 | [log] [tgz] |
---|---|---|
author | Chris Craik <ccraik@google.com> | Wed Jan 17 15:34:59 2018 -0800 |
committer | Chris Craik <ccraik@google.com> | Tue Jan 23 09:18:27 2018 -0800 |
tree | f46e83c7ec188983bc97cce338a11b8c46952a84 | |
parent | 13115a449afe285921acd754b18d74c0a5061ccf [diff] |
Port ListAdapter from Paging Library to RecyclerView Bug:67420319 Bug:70411933 Bug:70678044 Bug:72116084 Test: ListAdapterHelperTest Api / behavior changes as part of the port: 1) Hid ListAdapterConfig.Builder#setMainThreadExecutor, since it shouldn't be necessary for external usage 2) Put DiffCallback in ListAdapterConfig.Builder constructor, since it's required, and enables diamond operator (or type inference, in Kotlin) 3) Removed Arch executors, and in their place use a) a main thread handler, and b) a static background thread pair. Neither is ideal, but can be cleaned up in the future once supportlib has these sorts of Executors. 4) Make DiffUtil.ItemCallback no longer @NonNull, since arbitrary lists in ListAdapter contain arbitrary data. Once we have type annotations in support lib, we can fix this. 5) Move AdapterCallback to top level public method, since it's usage makes ListAdapterHelper more convenient. Making the Paging lib depend on this version of ListAdapter in supportlib will come in a follow up. Change-Id: I0123ce4a9319434208b6228dee1c6563c774f145
We are not currently accepting new modules, features, or behavior changes.
NOTE: You will need to use Linux or Mac OS. Building under Windows is not currently supported.
Follow the “Downloading the Source” guide to install and set up repo
tool, but instead of running the listed repo
commands to initialize the repository, run the folowing:
repo init -u https://android.googlesource.com/platform/manifest -b ub-supportlib-master
Now your repository is set to pull only what you need for building and running support library. Download the code (and grab a coffee while we pull down 7GB):
repo sync -j8 -c
You will use this command to sync your checkout in the future - it’s similar to git fetch
Open path/to/checkout/frameworks/support/
in Android Studio. Now you're ready edit, run, and test!
If you get “Unregistered VCS root detected” click “Add root” to enable git integration for Android Studio.
If you see any warnings (red underlines) run Build > Clean Project
.
You can do most of your work from Android Studio, however you can also build the full support library from command line:
cd path/to/checkout/frameworks/support/ ./gradlew createArchive
Run FooBarTest
Run android.support.foobar
Support library has a set of Android applications that exercise support library code. These applications can be useful when you want to debug a real running application, or reproduce a problem interactively, before writing test code.
These applications are named support-*-demos (e.g. support-4v-demos or support-leanback-demos. You can run them by clicking Run > Run ...
and choosing the desired application.
cd path/to/checkout/frameworks/support/ repo start my_branch_name . (make needed modifications) git commit -a repo upload --current-branch .
If you see the following prompt, choose always
:
Run hook scripts from https://android.googlesource.com/platform/manifest (yes/always/NO)?