I know that notifyItemInserted(position) is used, but in most of the examples I have seen it gets triggered with help of Click Listeners.
But in my case I want adapter to know the change and update its view when a button in another activity is pressed.
How can I achieve this?
Consider below example scenario: 1) App starts with Activity A
2) Activity A contains recyclerview
3) As Currently data is empty no items is shown in recyclerview
4) Somehow I got into Activity B
4) I updated the data and pressed Button
5) As new data is there, recyclerview is now having a single view with updated data