I intialize my recycler view adapter with an empty arraylist initially.
Then later once I fetch data from API I try to update the adapter by calling
myList = new ArrayList<>();
myRecyclerAdapter = new myRecyclerAdapter(getActivity(), myList, "");
linearLayoutManager = new LinearLayoutManager(getActivity());
void updateRecyclerView(ArrayList<Data> newList)
I made a costliest mistake and ponder around something else instead of looking it at different aspect.
SwipeRefreshLayout that wraps
I should've just use
setRefreshing(false) once data downloaded through API call. Instead I used
setVisibility(VIEW.GONE) on mymSwipeRefreshLayout`.
This visibility change of
I hope none will do this mistake. Perhaps someone might come across this tiniest mistake so I Mark my answer as accepted answer.