How to sort Cursor in Android RecycleView Adapter

First, let’s refresh some memories for Android Cursor.

https://developer.android.com/reference/android/database/Cursor

This interface provides random read-write access to the result set returned by a database query.

Basically cursor is a result holder of a database query, typically for listing data in Android RecyclerView. Like querying the contacts database and display in an address book page.