title: Anchoring a PopupMenu to Navigationview menu items
body: <p><strong>Since this question and its answer didn't show up anywhere, thought I might as well contribute a little for once by sharing the way I found.</strong>
  <br><br>So I had this issue with anchoring a PopupMenu object to a NavigationView menu since I couldn't get any items out of it in the form of a view:
  <br></p>
  
  <pre><code>//onCreate:
       NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
          navigationView.setNavigationItemSelectedListener(this);
          drawerMenu = navigationView.getMenu();
  
  
  //onNavigationItemSelected(MenuItem menuItem):
       switch (menuItem.getItemId()) {
                  case R.id.menubutton_submenuButton:
                      //the following line is merely how I'd imagine it should be
                      PopupMenu popupMenu = new PopupMenu(this, drawerMenu.findItem(R.id.menubutton_submenuButton));
                      popupMenu.getMenuInflater().inflate(R.menu.sub_menu, popupMenu.getMenu());
                      popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
                          @Override
                          public boolean onMenuItemClick(MenuItem item) {
                              //handle the inflated menu's buttons here
                              return true;
                          }
                      });
                      popupMenu.show();
                      break;
      }
  </code></pre>
  
  <p>So then, the problem is basically where                     </p>
  
  <pre><code>drawerMenu.findItem(R.id.menubutton_submenuButton));
  </code></pre>
  
  <p>isn't a View of any sort, which leaves the PopupMenu with nothing to anchor to.</p>