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 bugfixes, 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 anOptions
object 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
View
orViewHolder
objects 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.x
you must explicitly callstartListening()
andstopListening()
or pass aLifecycleOwner
to 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
. Seefirestore/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 aFirebaseImageLoader
to eachGlide
invocation, 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.x
see the official migration guide.