Exemple #1
0
  @Subscribe
  public void onOverflowButtonClickEvent(OverflowButtonClickEvent event) {
    if (DDGControlVar.mDuckDuckGoContainer.currentFragmentTag.equals(getTag()) && webMenu != null) {
      if (overflowMenu != null && overflowMenu.isShowing()) {
        return;
      }

      onPrepareOptionsMenu(webMenu);

      overflowMenu = new DDGOverflowMenu(getActivity());
      overflowMenu.setHeaderMenu(headerMenu);
      overflowMenu.setMenu(webMenu);
      overflowMenu.setMenu(mainMenu, true);
      overflowMenu.show(event.anchor);
    }
  }
Exemple #2
0
  @Subscribe
  public void onWebViewOpenMenuEvent(WebViewOpenMenuEvent event) {
    if (webMenu != null) {

      onPrepareOptionsMenu(webMenu);

      if (overflowMenu != null && overflowMenu.isShowing()) {
        return;
      }

      overflowMenu = new DDGOverflowMenu(getActivity());
      overflowMenu.setHeaderMenu(headerMenu);
      overflowMenu.setMenu(webMenu);
      overflowMenu.setMenu(mainMenu, true);
      overflowMenu.show(event.anchorView);
    }
  }