I got the best answer to this question:
- prepare your data in Activity, and then send it to your adapter. It can be loading data through
AsyncTask or from SQLite or something else. - In the adapter, load data through
AsyncTask or from SQLite or something else.
But the best option is to load the data into the Activity and use it in the Adapter. This will help you make your codes cleaner and it will give you more flexibility to manage your data. But in some situations, you might consider preparing data in the Adapter; if you find it difficult to load it into Activity.
Both work great, it's up to you what you think.
source share