title: Trying to include toolbar to Application that used NavDrawer template
body: <p>I am trying to move an old app over to the new Material design guidelines. I used the Navigation Drawer Template previously to create the Main Activity. However I am having some massive problems trying to implement the Toolbar to the main Activity. I am continuously getting NullPointer Exceptions. </p>
  
  <p>I am creating a toolbar xml file like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/toolbar_main"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/blue" &gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>After that I am trying to add it to my main layout using the include command:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.medinfo.main.MainActivity" &gt;
  
      &lt;include layout="@layout/toolbar_database_edit" /&gt;
  
      &lt;FrameLayout
          android:id="@+id/container"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;fragment
          android:id="@+id/navigation_drawer"
          android:name="com.medinfo.fragments.NavigationDrawerFragment"
          android:layout_width="@dimen/navigation_drawer_width"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          tools:layout="@layout/fragment_navigation_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>In my activity_main I am doing the following:
  The NPE is occuring when I call setSupportActionBar or when the Setup NavDrawer is called.</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Toolbar toolbar = (Toolbar) findViewById(R.layout.toolbar_database_edit);
          setSupportActionBar(toolbar);
  
          mNavigationDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
          mTitle = getTitle();
  
          // Set up the drawer.
          mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout));
      }
  </code></pre>
  
  <p>I tried wrapping the DrawerLayout in a linear-layout, what that did was create the toolbar behind the container that contains my fragments, when I started the activity I saw the toolbar rendered in the background then hidden once the Container and fragments were loaded. It did however remove the NPE. I also tried creating the toolbar within the layout instead of using a separate toolbar XML file. I still got the same NPE error.</p>
  
  <p>While I am asking about the new Material Design Stuff, I would also like to know if there is a way to get my EditText Widgets and Spinner Widgets to use the old Holo Theme/Style.</p>
  
  <p><img src="https://i.stack.imgur.com/r28Je.jpg" alt="EditText Holo"></p>
  
  <p><img src="https://i.stack.imgur.com/JPjnB.jpg" alt="EditText Material"></p>
  
  <p><img src="https://i.stack.imgur.com/6RSiO.jpg" alt="Spinner Holo"></p>
  
  <p><img src="https://i.stack.imgur.com/VtJD2.jpg" alt="Spinner Material"></p>
  
  <p>I am really hoping there is a simple way to revert to those styles.</p>
  
  <p>Thank you for the help everyone</p>