I have a recycler view in my application, and instead of executing an onclick listener, I want to click a button outside of the recycler view, which instructs the app to go through all the items in my recycler view and perform operations on items. How can I do that?
You can add a public method in your adapter to get the list
public List<Model> getList(){
return modelList;
}
Get the list anywhere
List<Model> listToModify = adapter.getList();
Loop through the list and modify it, then set it to the adapter or call notifyDataSetChanged();