How do I scroll my recyclerview to the top when items order has changed?
I have a
.I am sorting that list based on the selected chip.Here is my sorting code:
SortingUtil
enum class SortingUtil {
DESCBYTOTALCASES,
ASCBYTOTALCASES,
DESCBYDEATHCASES,
ASCBYDEATHCASES,
DESCBYALPHA,
ASCBYALPHA
}
CountriesFragment
@Inject
lateinit var mAdapter: CountriesFragmentAdapter
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {...