title: How to get the id of Sub Menu in Navigation view
body: <p>I have implemented new Navigation view in navigation drawer. Now I want to hide and show the logout menu item on several login and logout condition.</p>
  
  <p>here is my menu item of navigation view </p>
  
  <p>
  </p>
  
  <pre><code>&lt;group android:checkableBehavior="single"&gt;
  
      &lt;item
          android:id="@+id/home"
          android:checked="false"
          android:icon="@drawable/drawer_ic_home"
          android:title="@string/home_string" /&gt;
  
      &lt;item
          android:id="@+id/offer_coffee"
          android:checked="false"
          android:icon="@drawable/drawer_ic_offer_coffee"
          android:title="@string/offer_coffee_string" /&gt;
  
  
      &lt;item
          android:id="@+id/share_coffee"
          android:checked="false"
          android:icon="@drawable/drawer_ic_share_coffee"
          android:title="@string/share_coffee_string" /&gt;
      &lt;item
          android:id="@+id/take_coffee"
          android:checked="false"
          android:icon="@drawable/drawer_ic_take_coffee"
          android:title="@string/take_coffee_string" /&gt;
  
  
      &lt;item
          android:id="@+id/offer_status"
          android:checked="false"
          android:icon="@drawable/drawer_ic_coffee"
          android:title="@string/offer_status"
          /&gt;
  
  
      &lt;item
          android:id="@+id/about_us"
          android:checked="false"
          android:icon="@drawable/drawer_ic_about_us"
          android:title="@string/about_us_string" /&gt;
  
      &lt;item
          android:id="@+id/logout"
          android:checked="false"
          android:icon="@drawable/logout"
          android:title="@string/logout" /&gt;
  
  &lt;/group&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to hide the Logout item if I am not login and if I am login then I want to show this sub menu. </p>
  
  <p>I have seen several links but they all are working on group of items but in my case I have to access single sub menu item named Logout in the group . </p>