title: Uncalled onCreateOptionsMenu with custom ToolBar
body: <p>I'm using my own <strong>style</strong> in my AndroidApplication but it did not  let me see the menu ( 3 dots ) also the activity title. Any suggestion? </p>
  
  <pre><code>&lt;style name="AppTheme.NoActionBar"&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>But in my MainActivity the menu is not inflated, and the activity title didn't apear. </p>
  
  <p>You can see here my <strong>Manifest</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;application
      android:name=".App"
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme.NoActionBar"&gt;
      &lt;activity android:name=".LoginActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
  
      &lt;activity android:name=".main.ui.MainActivity"
          android:theme="@style/AppTheme.NoActionBar"/&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>and my <strong>MainActivity.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      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:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:context=".main.ui.MainActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingTop="@dimen/appbar_padding_top"
          android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              app:layout_scrollFlags="scroll|enterAlways"
              app:popupTheme="@style/AppTheme.PopupOverlay"&gt;
  
          &lt;/android.support.v7.widget.Toolbar&gt;
  
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/tabs"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>and  finally my <strong>MainActivity.class</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  @Bind(R.id.toolbar)
  Toolbar toolbar;
  @Bind(R.id.tabs)
  TabLayout tabs;
  @Bind(R.id.container)
  ViewPager container;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ButterKnife.bind(this);
  }
  
  
  
      @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return super.onCreateOptionsMenu(menu);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      if (item.getItemId() == R.id.action_logout) {
          logout();
      }
      return super.onOptionsItemSelected(item);
  }
  
  private void logout() {
      Twitter.logOut();
      Intent intent = new Intent(this, LoginActivity.class);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
              | Intent.FLAG_ACTIVITY_NEW_TASK
              | Intent.FLAG_ACTIVITY_CLEAR_TASK);
      startActivity(intent);
  }
  </code></pre>
  
  <p>}</p>
  
  <p><a href="http://i.stack.imgur.com/Cewlv.png" rel="nofollow">enter image description here</a></p>