Exemplo n.º 1
0
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);
    getMenuInflater().inflate(R.menu.repo_detail_activity, menu);

    return true;
  }
Exemplo n.º 2
0
  public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);

    if (getToolbar() != null) {
      getToolbar().inflateMenu(R.menu.search_activity_menu);

      MenuItem searchItem = menu.findItem(R.id.action_search);

      IconicsDrawable searchIcon =
          new IconicsDrawable(getApplicationContext(), Octicons.Icon.oct_search)
              .actionBar()
              .colorRes(R.color.gray_github_medium);

      searchItem.setIcon(searchIcon);
    }

    return true;
  }