Bot releases are hidden (Show)
Published by elihart about 7 years ago
New If a @ModelView
generated model has a custom base class the generated model will now inherit constructors from the base class (https://github.com/airbnb/epoxy/pull/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 - https://github.com/airbnb/epoxy/pull/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 - https://github.com/airbnb/epoxy/pull/317)
Improvement EpoxyModelGroup
now supports partial rebinds (https://github.com/airbnb/epoxy/pull/316)
Published by elihart about 7 years ago
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 (https://github.com/airbnb/epoxy/issues/293 - Thanks @niccorder!)
New EpoxyRecyclerView
and Carousel
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)
Published by elihart about 7 years ago
Published by elihart about 7 years ago
autoLayout
parameter in @ModelView
instead of needing to create a layout resource for defaultLayout
. Epoxy will then create your view programmatically (https://github.com/airbnb/epoxy/pull/282).Breaking
onSwipeProgressChanged
callback in EpoxyTouchHelper
had a Canvas
parameter added (https://github.com/airbnb/epoxy/pull/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.Published by elihart about 7 years ago
Improvement If you are setting options on a @ModelProp and have no other annotation parameters you can now omit the explicit options =
param name (https://github.com/airbnb/epoxy/pull/268)
Improvement If you are using @TextProp
you can now specify a default string via a string resource (https://github.com/airbnb/epoxy/pull/269)
Fixed EpoxyModelGroup was not binding model click listeners correctly (https://github.com/airbnb/epoxy/pull/267)
Fixed A model created with @ModelView could fail to compile if it had nullable prop overloads (https://github.com/airbnb/epoxy/pull/274)
A model created with @ModelView with a click listener had the wrong setter name for the model click listener overload (https://github.com/airbnb/epoxy/pull/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.
Published by elihart about 7 years ago
AfterPropsSet
annotation for use in @ModelView
classes. This allows initialization work to be done after all properties are bound from the model. (https://github.com/airbnb/epoxy/pull/242)TextProp
and CallbackProp
as convenient replacements for ModelProp
. (https://github.com/airbnb/epoxy/pull/260)EpoxyTouchHelper
class. https://github.com/airbnb/epoxy/wiki/Touch-Support
getRootView
to the view holder class in EpoxyModelGroup
and made the bind methods on EpoxyModelGroup
non final. This allows access to the root view of the group.Published by elihart over 7 years ago
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 the View.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 to View.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 generated toString
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!)
Published by elihart over 7 years ago
.addTo(this)
line. More details and instructions here
Published by elihart over 7 years ago
EpoxyController
class helps you manage models even better. This should be used instead of the original EpoxyAdapter
in most places. Read more about EpoxyController
in the wiki.equals
and hashCode
on each model to check for changes. This is a change from the EpoxyAdapter where only hashCode
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 have equals
implemented as well.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 to View.OnClickListener
because of the new overloaded method.EpoxyModelWithView
supports creating a View programmatically instead of inflating from XML.EpoxyModelGroup
supports grouping models together in arbitrary formations.@EpoxyAttribute(hash = false)
you should now do @EpoxyAttribute(DoNotHash)
. You can also set other options like that.PackageEpoxyConfig
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.Published by elihart over 7 years ago
createNewHolder
method to be omitted and generated automatically (#105)
removeAllModels
method to EpoxyAdapter (#94)
Published by elihart almost 8 years ago
reset()
method on each model to reset annotated fields to their defaults.@EpoxyAttribute(hash = false)
to still differentiate between null and non null values in the hashcode implementationnotifyModelChanged
method to EpoxyAdapter that allows a payload to be specifiedtoString()
method on all generated model classes that includes the values of all annotated fields.Published by elihart about 8 years ago
*Optimizations to the diffing algorithm
*Setters on generated classes are not created if an @EpoxyAttribute field is marked as final
*Adds @EpoxyModelClass annotation to force a model to have a generated class, even if it doesn't have any @EpoxyAttribute fields
*Fix to not generate methods for package private @EpoxyAttribute fields that are in a different package from the generated class
*Have generated classes duplicate any super methods that have the model as the return type to help with chaining
Published by elihart about 8 years ago
EpoxyAdapter#notifyDataSetChanged()
is called when diffing is enabled. It doesn't make sense to allow this alongside diffing, and calling this is most likely to be an accidental mixup with notifyModelsChanged()
.Published by elihart about 8 years ago
EpoxyAdapter#onModelBound
to include the model position. If you override this method you will have to update its signature.EpoxyModel
cannot change once it has been added to the adapter when using diffing. It will now crash on diff if you do this. This change will allow us to optimize the diffing algorithm and prevent bugs where ids are accidentally changed without proper notification.getDefaultLayout
EpoxyAttribute
annotation to exclude a field from being included in the generated hashcode method.Published by elihart about 8 years ago
First public release of Epoxy.