I am getting the new list with new item at the start in my live data and then using its data to update the adapter
viewModel.myLiveData.observe { this, Observer
Thank you everyone for response. But the only work that did worked for me was to place a 1 second delay after executing submitList. Even though not appropriate one, But works for the following reason:
adapter.submitList()
will always take the same execution time (within milliseconds)
I just called
Handler().postDelayed ({
recycler.scrollToPosition(0)
}, 1000)