Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * getAllFavourites method to get the favourites movies with the help of Executors
- * and then calling the switch adapter method to change the data in the activity
- */
- public void getAllFavourites() {
- //Get list of movies
- // Earlier used this => final List<MovieResponseEntity.Result> entityList = new ArrayList<MovieResponseEntity.Result>();
- final ArrayList<List<MovieResponseEntity.Result>> entityList = new ArrayList<List<MovieResponseEntity.Result>>();
- AppExecutor.getInstance().diskIO().execute(new Runnable() {
- @Override
- public void run() {
- entityList.add(FavouriteMoviesDatabase.getDatabase(getApplicationContext()).moviesDao().getFavouriteMovieList());
- }
- });
Add Comment
Please, Sign In to add comment