Skip to content

Commit

Permalink
Add a method to request visibility check. An example is when you nes…
Browse files Browse the repository at this point in the history
…t a horizontal Epoxy backed RecyclerView in a non Epoxy vertical RecyclerView. When the vertical RecyclerView scroll you want to notify the visibility tracker attached on the horizontal RecyclerView. (#775)
  • Loading branch information
eboudrant authored and elihart committed Jun 27, 2019
1 parent c51ab81 commit 18db07b
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ public void clearVisibilityStates() {
visibilityIdToItems.clear();
}

/**
* Calling this method will make the visibility tracking check and trigger events if necessary. It
* is particularly useful when the visibility of an Epoxy model is changed outside of an Epoxy
* RecyclerView.
*
* An example is when you nest an horizontal Epoxy backed RecyclerView in a non Epoxy vertical
* RecyclerView. When the vertical RecyclerView scroll you want to notify the visibility tracker
* attached on the horizontal RecyclerView.
*/
public void requestVisibilityCheck() {
processChangeEvent("requestVisibilityCheck");
}

private void processChangeEvent(String debug) {
processChangeEventWithDetachedView(null, debug);
}
Expand Down

0 comments on commit 18db07b

Please sign in to comment.