Ejemplo n.º 1
0
 /** 获取该歌手的所有歌曲 */
 public static ArrayList<Song> getArtistSong(Artist artist) {
   ArrayList<Song> songs = new ArrayList<>();
   for (Song s : mSongLib) {
     if (s.getmArtistId() == artist.getmArtistId()) {
       songs.add(s);
     }
   }
   return songs;
 }
Ejemplo n.º 2
0
 /** 获取歌手的所有专辑 */
 public static ArrayList<Album> getArtistAlbums(Artist artist) {
   ArrayList<Album> albums = new ArrayList<>();
   for (Album a : mAlbumLib) {
     if (a.getmArtistId() == artist.getmArtistId()) {
       albums.add(a);
     }
   }
   return albums;
 }