This document outlines the key breaking changes made between versions 2.3.0 and 3.0.0 as well
as suggested upgrade paths. This is not a comprehensive list of all features or bug fixes, please
reference the release notes for that information.
For a full, machine-generated compatibility report see the docs/compat_reports folder.
No breaking changes
- Adapter initialization - in previous versions the adapter classes (
FirebaseRecyclerAdapter,FirebaseListAdapter, etc) had multiple constructor overloads. In3.x, each adapter has a single constructor that takes anOptionsobject likeFirebaseRecyclerOptions. These options objects can be constructed via their respective builders. For more information, seedatabase/README.md. - View logic - adapter classes no longer automatically create
VieworViewHolderobjects as required by their parent adapter classes. These methods are left to the developer, see the sample app for how to implementonCreateViewHolder()and other required methods. - Adapter lifecycle - in previous versions the adapters began listening immediately upon
instantiation and had a
cleanup()call to stop listening. In3.xyou must explicitly callstartListening()andstopListening()or pass aLifecycleOwnerto the options builder. - Errors and event types - errors in the adapters are now exposed via the
onError()method. Data changes are exposed throughonChildChanged()andonDataChanged(). - Indexed adapters - the indexed adapters have been removed. To use indexed data, use the
setIndexedQuery()method when building adapter options. - Observable snapshot arrays -
ObservableSnapshotArray<T>and related classes previously implementedList<DataSnapshot>. They now implementList<T>for simpler iteration over model objects.
New module firebase-ui-firestore. See firestore/README.md for more information.
- Glide 4.0 - the underlying Glide dependency was upgraded to version
4.1.x. This new version of Glide changes how custom loaders (likeFirebaseImageLoader) are added. Rather than passing aFirebaseImageLoaderto eachGlideinvocation, you must create a Glide app module and register the loader there. For more information seestorage/README.md. For comprehensive documentation on upgrading your app to Glide4.xsee the official migration guide.