I'm developing an app in which I'm retrieving some data from
well first of all the question is about
recyclerview and you posted code of your data retrieval. and if your want to add a new item to recycler view use
mArrayList.add(position, item); notifyItemInserted(position);
for data to be inserted in first row use
mArrayList.add(0, item); notifyItemInserted(0);
and then you can use
mRecyclerView.smoothScrollToPosition(0); to scroll to the top.