Пример #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);
    }
  }
Пример #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());
  }