-
- All Implemented Interfaces:
-
com.airbnb.epoxy.GeneratedModel,com.airbnb.epoxy.GroupModelBuilder,com.airbnb.epoxy.ModelCollector
public class GroupModel_ extends GroupModel implements GeneratedModel<ModelGroupHolder>, GroupModelBuilder
Generated file. Do not modify!
-
-
Constructor Summary
Constructors Constructor Description GroupModel_()GroupModel_(int layoutRes)
-
Method Summary
Modifier and Type Method Description voidaddTo(EpoxyController controller)Add this model to the given controller. voidhandlePreBind(EpoxyViewHolder holder, ModelGroupHolder object, int position)Called on the generated model immediately before the main model onBind method has been called. voidhandlePostBind(ModelGroupHolder object, int position)Called on the generated model immediately after the main model onBind method has been called.This let's the generated model handle binding of its own and dispatch calls to its onBindlistener. GroupModel_onBind(OnModelBoundListener<GroupModel_, ModelGroupHolder> listener)Register a listener that will be called when this model is bound to a view. voidunbind(ModelGroupHolder object)Called when the view bound to this model is recycled. GroupModel_onUnbind(OnModelUnboundListener<GroupModel_, ModelGroupHolder> listener)Register a listener that will be called when this model is unbound from a view. voidonVisibilityStateChanged(int visibilityState, ModelGroupHolder object)TODO link to the wiki GroupModel_onVisibilityStateChanged(OnModelVisibilityStateChangedListener<GroupModel_, ModelGroupHolder> listener)Register a listener that will be called when this model visibility state has changed. voidonVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, ModelGroupHolder object)TODO link to the wiki GroupModel_onVisibilityChanged(OnModelVisibilityChangedListener<GroupModel_, ModelGroupHolder> listener)Register a listener that will be called when this model visibility has changed. GroupModel_shouldSaveViewState(boolean shouldSaveViewState)GroupModel_id(long id)Override the default id in cases where the data subject naturally has an id, like an objectfrom a database. GroupModel_id(@Nullable() Array<Number> ids)Use multiple numbers as the id for this model. GroupModel_id(long id1, long id2)Use two numbers as the id for this model. GroupModel_id(@Nullable() CharSequence key)Use a string as the model id. GroupModel_id(@Nullable() CharSequence key, @Nullable() Array<CharSequence> otherKeys)Use several strings to define the id of the model. GroupModel_id(@Nullable() CharSequence key, long id)Set an id that is namespaced with a string. GroupModel_layout(@LayoutRes() int layoutRes)GroupModel_spanSizeOverride(@Nullable() EpoxyModel.SpanSizeOverrideCallback spanSizeCallback)GroupModel_show()Change the visibility of the model so that it's view is shown. GroupModel_show(boolean show)Change the visibility of the model's view. GroupModel_hide()Change the visibility of the model so that it's view is hidden. GroupModel_reset()Sets fields of the model to default ones. booleanequals(Object o)inthashCode()StringtoString()-
Methods inherited from class com.airbnb.epoxy.GroupModel
add -
Methods inherited from class com.airbnb.epoxy.EpoxyModelGroup
bind, bind, bind, getSpanSize, onViewAttachedToWindow, onViewDetachedFromWindow, shouldSaveViewState, shouldSaveViewState, unbind -
Methods inherited from class com.airbnb.epoxy.EpoxyModelWithHolder
bind, bind, bind, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onVisibilityChanged, onVisibilityStateChanged, unbind -
Methods inherited from class com.airbnb.epoxy.EpoxyModel
addIf, addIf, addTo, bind, bind, bind, buildView, getLayout, hide, id, id, id, id, id, id, id, isShown, layout, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onVisibilityChanged, onVisibilityStateChanged, preBind, reset, show, show, spanSize, spanSizeOverride, unbind -
Methods inherited from class com.airbnb.epoxy.GeneratedModel
handlePostBind, handlePreBind -
Methods inherited from class com.airbnb.epoxy.GroupModelBuilder
id, id, id, id, id, id, layout, onBind, onUnbind, onVisibilityChanged, onVisibilityStateChanged, shouldSaveViewState, spanSizeOverride -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
addTo
void addTo(EpoxyController controller)
Add this model to the given controller. Can only be called from inside .
-
handlePreBind
void handlePreBind(EpoxyViewHolder holder, ModelGroupHolder object, int position)
Called on the generated model immediately before the main model onBind method has been called.This let's the generated model handle binding setup of its own
The ViewHolder is needed to get the model's adapter position when clicked.
-
handlePostBind
void handlePostBind(ModelGroupHolder object, int position)
Called on the generated model immediately after the main model onBind method has been called.This let's the generated model handle binding of its own and dispatch calls to its onBindlistener.
We don't want to rely on the main onBind method to dispatch the onBind listener call becausethere are two onBind methods (one for payloads and one for no payloads), and one can call intothe other. We don't want to dispatch two onBind listener calls in that case.
-
onBind
GroupModel_ onBind(OnModelBoundListener<GroupModel_, ModelGroupHolder> listener)
Register a listener that will be called when this model is bound to a view.
The listener will contribute to this model's hashCode state per the rules.
You may clear the listener by setting a null value, or by calling reset
-
unbind
void unbind(ModelGroupHolder object)
Called when the view bound to this model is recycled. Subclasses can override this if theirview should release resources when it's recycled.
Note that bind can be called multiple times without an unbind call in betweenif the view has remained on screen to be reused across item changes. This means that you shouldnot rely on unbind to clear a view or model's state before bind is called again.
-
onUnbind
GroupModel_ onUnbind(OnModelUnboundListener<GroupModel_, ModelGroupHolder> listener)
Register a listener that will be called when this model is unbound from a view.
The listener will contribute to this model's hashCode state per the rules.
You may clear the listener by setting a null value, or by calling reset
-
onVisibilityStateChanged
void onVisibilityStateChanged(int visibilityState, ModelGroupHolder object)
TODO link to the wiki
-
onVisibilityStateChanged
GroupModel_ onVisibilityStateChanged(OnModelVisibilityStateChangedListener<GroupModel_, ModelGroupHolder> listener)
Register a listener that will be called when this model visibility state has changed.
The listener will contribute to this model's hashCode state per the rules.
-
onVisibilityChanged
void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, ModelGroupHolder object)
TODO link to the wiki
-
onVisibilityChanged
GroupModel_ onVisibilityChanged(OnModelVisibilityChangedListener<GroupModel_, ModelGroupHolder> listener)
Register a listener that will be called when this model visibility has changed.
The listener will contribute to this model's hashCode state per the rules.
-
shouldSaveViewState
GroupModel_ shouldSaveViewState(boolean shouldSaveViewState)
-
id
GroupModel_ id(long id)
Override the default id in cases where the data subject naturally has an id, like an objectfrom a database. This id can only be set before the model is added to the adapter, it is anerror to change the id after that.
-
id
GroupModel_ id(@Nullable() Array<Number> ids)
Use multiple numbers as the id for this model. Useful when you don't have a single long thatrepresents a unique id.
This hashes the numbers, so there is a tiny risk of collision with other ids.
-
id
GroupModel_ id(long id1, long id2)
Use two numbers as the id for this model. Useful when you don't have a single long thatrepresents a unique id.
This hashes the two numbers, so there is a tiny risk of collision with other ids.
-
id
GroupModel_ id(@Nullable() CharSequence key)
Use a string as the model id. Useful for models that don't clearly map to a numerical id. Thisis preferable to using hashCode because that is a 32 bit hash and this is a 64bit hash, giving better spread and less chance of collision with other ids.
Since this uses a hashcode method to convert the String to a long there is a very small chancethat you may have a collision with another id. Assuming an even spread of hashcodes, andseveral hundred models in the adapter, there would be roughly 1 in 100 trillion chance of acollision. (http://preshing.com/20110504/hash-collision-probabilities/)
-
id
GroupModel_ id(@Nullable() CharSequence key, @Nullable() Array<CharSequence> otherKeys)
Use several strings to define the id of the model.
Similar to id, but with additional strings.
-
id
GroupModel_ id(@Nullable() CharSequence key, long id)
Set an id that is namespaced with a string. This is useful when you need to show models ofmultiple types, side by side and don't want to risk id collisions.
Since this uses a hashcode method to convert the String to a long there is a very small chancethat you may have a collision with another id. Assuming an even spread of hashcodes, andseveral hundred models in the adapter, there would be roughly 1 in 100 trillion chance of acollision. (http://preshing.com/20110504/hash-collision-probabilities/)
-
layout
GroupModel_ layout(@LayoutRes() int layoutRes)
-
spanSizeOverride
GroupModel_ spanSizeOverride(@Nullable() EpoxyModel.SpanSizeOverrideCallback spanSizeCallback)
-
show
GroupModel_ show()
Change the visibility of the model so that it's view is shown. This only works if the model isused in EpoxyAdapter or a EpoxyModelGroup, but is not supported in
-
show
GroupModel_ show(boolean show)
Change the visibility of the model's view. This only works if the model isused in EpoxyAdapter or a EpoxyModelGroup, but is not supported in
-
hide
GroupModel_ hide()
Change the visibility of the model so that it's view is hidden. This only works if the model isused in EpoxyAdapter or a EpoxyModelGroup, but is not supported in
-
reset
GroupModel_ reset()
Sets fields of the model to default ones.
-
hashCode
int hashCode()
-
-
-
-