-
-
Notifications
You must be signed in to change notification settings - Fork 45
Porting from 1.x to 2.x
Giorgio Antonioli edited this page Dec 12, 2017
·
2 revisions
The version 2.x introduces the following breaking changes:
- Removed all the deprecated APIs from 1.x (factories and utils)
- Removed all the XML default properties of a divider
All the factories have now a manager relative class:
-
DrawableFactory
→DrawableManager
-
MarginFactory
→InsetManager
-
SizeFactory
→SizeManager
-
TintFactory
→TintManager
-
VisibilityFactory
→VisibilityManager
The only difference in the implementation is about MarginFactory
because InsetManager
is more flexible and allows a different margin size before and after the item. To reproduce the behavior of MarginFactory
, you need to return the same value for itemInsetBefore()
and itemInsetAfter()
.
The properties recycler_view_divider_size
, recycler_view_divider_margin_size
, recycler_view_divider_inset_before
and recycler_view_divider_inset_after
are now removed. So, in case you need to override the value of the default properties, the same result can be obtained using a RecyclerViewDivider.BuilderProvider
as explained here.