title: How to set menu items in a fragment toolbar?
body: <p>I have a fragment in my Activity and the fragment has its own toolbar. Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/hId7X.png" rel="noreferrer">Image</a></p>
  
  <p>Here is the layout of the fragment:</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.hometsolutions.space.Fragments.ControlFragment"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/Setup_next_toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="?attr/colorPrimary"
              android:elevation="4dp"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/recycler_view_setup_next"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_constraintTop_toBottomOf="@+id/setup_next_recycler" /&gt;
  
      &lt;/LinearLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><strong>I want to add menu on the Setup_next_toolbar. Not on the MainActivity toolBar.</strong></p>
  
  <p>I did this on the fragment:</p>
  
  <p>on the <code>onCreate</code>: <code>setHasOptionsMenu(true);</code></p>
  
  <p>then</p>
  
  <pre><code>@Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
      super.onCreateOptionsMenu(menu, inflater);
      inflater.inflate(R.menu.Setup_next_menu, menu);
  }
  </code></pre>
  
  <p>but it added the menu on the MainActivity tolbar. How can I set menuItems on the <strong><code>Setup_next_toolbar</code></strong>?</p>