You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/_docs/presenters.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,10 @@ These are the main tasks:
16
16
|----|--------|-----------|
17
17
|Holder creation|`onCreate(ViewGroup, Int)`|Here you must provide a `Holder` instance, typically inflating a layout resource.|
18
18
|Holder initialization|`onInitialize(Holder, Int)`|The holder was created. You can perform here initialization task that do not depend on data (like color filters to icon), or add Views and object to the Holder cache using `Holder.set(key, data)` and `Holder.get(key)`.|
19
-
|Binding|`onBind(Page, Holder, Element<T>)`|Bind data, contained in the given `Element`, to the view held by `Holder`.|
19
+
|Binding holder to data|`onBind(Page, Holder, Element<T>)`|Bind data, contained in the given `Element`, to the view held by `Holder`.|
20
+
|Attaching holder to hierarchy|`onAttach(Holder)`|Called when holder is attached to the view hierarchy and is about to be visible.|
21
+
|Detaching holder from hierarchy|`onDetach(Holder)`|Called when holder is detached from the view hierarchy and is invisible.|
22
+
|Unbinding holder from data|`onUnbind(Holder)`|Called when the holder is unbound from the `Element` data. Can be used to release resources acquired during `onBind`.|
20
23
21
24
Presenters also **accept a click listener** that will be automatically added to each view.
22
25
The click listener will be added to the root view of the Holder, or, if found, to a child view that
0 commit comments