Releases: airbnb/epoxy
2.7.0
-
New If a
@ModelView
generated model has a custom base class the generated model will now inherit constructors from the base class (#315) -
New Use the
EpoxyDataBindingPattern
annotation to specify a naming pattern for databinding layouts. This removes the need to declare every databinding layout explicitly (Wiki - #319) -
New If a view with
@ModelView
implements an interface then the generated model will implement a similar interface, enabling polymorphism with models. Wiki -
Improvement
PagingEpoxyController
now has getters to access the underlying data lists (Thanks to @pcqpcq - #317) -
Improvement
EpoxyModelGroup
now supports partial rebinds (#316)
2.6.0
-
Improvement If a
OnModelClickListener
is used it will not be called if a view is clicked while it is being removed or otherwise has no position (#293 - Thanks @niccorder!) -
New
EpoxyRecyclerView
andCarousel
provide out of the box integration with Epoxy along with other enhancements over regular RecyclerView (https://github.com/airbnb/epoxy/wiki/EpoxyRecyclerView) -
New
EpoxyPagingController
provides integration with the Android Paging architecture component as well as normal, large lists of items (https://github.com/airbnb/epoxy/wiki/Large-Data-Sets)
2.5.1
2.5.0
- New Feature Epoxy now generates a Kotlin DSL to use when building models in your EpoxyController! See the wiki for details
- New Feature You can use the
autoLayout
parameter in@ModelView
instead of needing to create a layout resource fordefaultLayout
. Epoxy will then create your view programmatically (#282).
Breaking
- The
onSwipeProgressChanged
callback inEpoxyTouchHelper
had aCanvas
parameter added (#280). You will need to update any of your usages to add this. Sorry for the inconvenience; this will hopefully help you add better swipe animations.
2.4.0
-
Improvement If you are setting options on a @ModelProp and have no other annotation parameters you can now omit the explicit
options =
param name (#268) -
Improvement If you are using
@TextProp
you can now specify a default string via a string resource (#269) -
Fixed EpoxyModelGroup was not binding model click listeners correctly (#267)
-
Fixed A model created with @ModelView could fail to compile if it had nullable prop overloads (#274)
Potentially Breaking Fix
A model created with @ModelView with a click listener had the wrong setter name for the model click listener overload (#275)
If you were setting this you will need to update the setter name. If you were setting the click listener to null you may now have to cast it.
2.3.0
- New An
AfterPropsSet
annotation for use in@ModelView
classes. This allows initialization work to be done after all properties are bound from the model. (#242) - New Annotations
TextProp
andCallbackProp
as convenient replacements forModelProp
. (#260) - New Easy support for dragging and swiping via the
EpoxyTouchHelper
class. https://github.com/airbnb/epoxy/wiki/Touch-Support - Change Added the method
getRootView
to the view holder class inEpoxyModelGroup
and made the bind methods onEpoxyModelGroup
non final. This allows access to the root view of the group. - Change Generated models will now inherit class annotations from the base class (#255 Thanks geralt-encore!)
2.2.0
-
Main Feature Models can now be completely generated from a custom view via annotations on the view. This should completely remove the overhead of creating a model manually in many cases! For more info, see the wiki
-
New Lowered the minimum SDK from 16 to 14.
-
New Models that have a
View.OnLongClickListener
as an EpoxyAttribute will now have an overloaded setter on the generated model that allows you to set a long click listener that will return the model, view, and adapter position. This is very similar to theView.OnClickListener
support added in 2.0.0, but for long click listeners. Upgrade Note If you were setting a long click listener value to null anywhere you will need to now cast that toView.OnLongClickListener
because of the new overloaded method. -
New
id
overload on EpoxyModel to define a model id with multiple strings -
New Option in
EpoxyAttribute
to not include the attribute in the generatedtoString
method (Thanks to @geralt-encore!) -
New
@AutoModel
models are now inherited from usages in super classes (Thanks to @geralt-encore!) -
Fixed Generated getters could recursively call themselves (Thanks to @geralt-encore!)
2.1.0
- New: Support for Android Data Binding! Epoxy will now generate an EpoxyModel directly from a Data Binding xml layout, and handle all data binding details automatically. Thanks to @geralt-encore for helping with this! See more details in the wiki.
- New: Support for Litho. Epoxy will now generate an EpoxyModel for Litho Layout Specs. See more details in the wiki.
- New: Support for implicitly adding AutoModels to an EpoxyController, this let's you drop the extra
.addTo(this)
line. More details and instructions here
2.0.0
- New: The
EpoxyController
class helps you manage models even better. This should be used instead of the originalEpoxyAdapter
in most places. Read more aboutEpoxyController
in the wiki. - Change: In the new EpoxyController, the diffing algorithm uses both
equals
andhashCode
on each model to check for changes. This is a change from the EpoxyAdapter where onlyhashCode
was used. Generated models have both hashCode and equals implemented properly already, but if you have any custom hashCode implementations in your models make sure you haveequals
implemented as well. - New: Models that have a
View.OnClickListener
as an EpoxyAttribute will now have an overloaded setter on the generated model that allows you to set a click listener that will return the model, view, and adapter position. Upgrade Note If you were setting a click listener value to null anywhere you will need to now cast that toView.OnClickListener
because of the new overloaded method. - New: Attach an onBind/onUnbind listener directly to a model instead of overriding the onModelBound method. Generated models will have methods created to set this listener and handle the callback for you.
- New: Support for creating models in Kotlin (Thanks to @geralt-encore! #144)
- New:
EpoxyModelWithView
supports creating a View programmatically instead of inflating from XML. - New:
EpoxyModelGroup
supports grouping models together in arbitrary formations. - New: Instead of setting attribute options like
@EpoxyAttribute(hash = false)
you should now do@EpoxyAttribute(DoNotHash)
. You can also set other options like that. - New: Annotation processor options can now be set via gradle instead of with
PackageEpoxyConfig
- New: In an EpoxyController, if a model with the same id changes state Epoxy will include its previous state as a payload in the change notification. The new model will have its
bind(view, previouslyBoundModel)
method called so it can compare what changed since the previous model, and so it can update the view with only the data that changed.