ListenerUtil.getListener(viewGroup, R.id.entryListener); if (oldEntries != newEntries && listener != null && oldEntries instanceof ObservableList) { ((ObservableList)oldEntries).removeOnListChangedCallback(listener);
@Override public void onDetachedFromRecyclerView(RecyclerView recyclerView) { if (this.recyclerView != null && items != null && items instanceof ObservableList) { ((ObservableList<T>) items).removeOnListChangedCallback(callback); } this.recyclerView = null; }
@Override public void onDetachedFromRecyclerView(RecyclerView recyclerView) { if (this.recyclerView != null && items instanceof ObservableList) { ((ObservableList<T>) items).removeOnListChangedCallback(callback); } this.recyclerView = null; }
public void setItems(@Nullable List<T> items) { if (this.items == items) { return; } // If a recyclerview is listening, set up listeners. Otherwise wait until one is attached. // No need to make a sound if nobody is listening right? if (recyclerView != null) { if (this.items instanceof ObservableList) { ((ObservableList<T>) this.items).removeOnListChangedCallback(callback); } if (items instanceof ObservableList) { ((ObservableList<T>) items).addOnListChangedCallback(callback); } } this.items = items; notifyDataSetChanged(); }
public void setItems(List<T> items) { if (this.items == items) { return; } if (this.items instanceof ObservableList) { ((ObservableList<T>) this.items).removeOnListChangedCallback(callback); } if (items instanceof ObservableList) { ((ObservableList<T>) items).addOnListChangedCallback(callback); } this.items = items; notifyDataSetChanged(); }
public void setItems(List<T> items) { if (this.items == items) { return; } // If a recyclerview is listening, set up listeners. Otherwise wait until one is attached. // No need to make a sound if nobody is listening right? if (recyclerView != null) { if (this.items instanceof ObservableList) { ((ObservableList<T>) this.items).removeOnListChangedCallback(callback); } if (items instanceof ObservableList) { ((ObservableList<T>) items).addOnListChangedCallback(callback); } } this.items = items; notifyDataSetChanged(); }