Exemplo n.º 1
0
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
    super.onCreateOptionsMenu(menu, menuInflater);
    if (!primaryFragment) {
      return;
    }

    if (info.getMissingArtists().isEmpty()) {
      menu.removeItem(R.id.menu_show_missing);
    }
  }
Exemplo n.º 2
0
  private void showMissingArtists() {
    StringBuilder b = new StringBuilder();

    for (String name : info.getMissingArtists()) {
      b.append(
          "<h3><a href=\"https://www.google.com/#q="
              + URLEncoder.encode(name)
              + "\">"
              + name
              + "</a></h3> ");
    }

    Util.showHTMLDialog(context, R.string.menu_similar_artists, b.toString());
  }
Exemplo n.º 3
0
 @Override
 public List<Artist> getObjects(
     MusicService musicService, boolean refresh, ProgressListener listener) throws Exception {
   info = musicService.getArtistInfo(artistId, refresh, true, context, listener);
   return info.getSimilarArtists();
 }