The LibraryFragments are now loading their content async.

This commit is contained in:
Karim Abou Zeid 2016-03-20 21:11:21 +01:00
commit 4e6df0faf8
15 changed files with 367 additions and 54 deletions

View file

@ -11,12 +11,11 @@ import android.support.annotation.Nullable;
import com.kabouzeid.gramophone.model.Playlist;
import java.util.ArrayList;
import java.util.List;
public class PlaylistLoader {
@NonNull
public static List<Playlist> getAllPlaylists(@NonNull final Context context) {
public static ArrayList<Playlist> getAllPlaylists(@NonNull final Context context) {
return getAllPlaylists(makePlaylistCursor(context, null, null));
}
@ -55,8 +54,8 @@ public class PlaylistLoader {
}
@NonNull
public static List<Playlist> getAllPlaylists(@Nullable final Cursor cursor) {
List<Playlist> playlists = new ArrayList<>();
public static ArrayList<Playlist> getAllPlaylists(@Nullable final Cursor cursor) {
ArrayList<Playlist> playlists = new ArrayList<>();
if (cursor != null && cursor.moveToFirst()) {
do {