Null object reference toolbar android
<p>I am trying to make a second <code>Toolbar</code>, next to the one I have in my top bar.
Basically there is a <code>Button</code> and when this is pressed, a bar pops up in the window.
The user should be able to read something on the bar and can push a <code>Button</code>.
Right now I am trying to just get text on there. But that doesn't seem to work.</p>

<p>.java function: (called when some button is pushed, this shows the toolbar)</p>

<pre><code>public void showDialogue() {
    //Set popupscherm as view
    View v = getLayoutInflater().inflate(R.layout.popupscherm,null);
    AlertDialog.Builder adb = new AlertDialog.Builder(GraphActivity.this);
    adb.setView(v);
    // Find the toolbar view inside the activity layout
    toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("test"); //Here it gives the error
    AlertDialog alert = adb.create();

    alert.show();
</code></pre>

<p>popupscherm.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"&gt;

    &lt;android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:minHeight="?attr/actionBarSize"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"&gt;
    &lt;/android.support.v7.widget.Toolbar&gt;

    &lt;/LinearLayout&gt;
</code></pre>

<p>error:</p>

<p><code>Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.Toolbar.setTitle(java.lang.CharSequence)' on a null object reference</code></p>