title: Android Navigation View set menu programmatically
body: <p>In my app I want to pass certain menu depending of some condition.</p>
  
  <p>This is the layout:</p>
  
  <pre><code> &lt;android.support.design.widget.NavigationView
          android:id="@+id/nav_view_free"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:fitsSystemWindows="true"
          android:background="@color/Color_White"
          app:headerLayout="@layout/nav_header_main"
          app:menu="@menu/activity_main_drawer_1"
          /&gt;
  </code></pre>
  
  <p>All I want to do is to change dynamically the @menu/activity_main_drawer_1 depending of some condition.</p>
  
  <p>How can I do this programmatically?</p>