Dialog.setTitle not showing a title
<p>I am trying to add a custom title to my Dialog, however whenever I run my application it doesn't show a title. </p>

<p>My code for creating the dialog is </p>

<pre><code> final Dialog passwordDialog = new Dialog(this);
 passwordDialog.setContentView(R.layout.admin_password_dialog);
 passwordDialog.setTitle("Enter An Administrative Password");
 passwordDialog.show();
</code></pre>

<p>And my layout file is </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent"&gt;

&lt;Button
    android:id="@+id/btn_confirmPassword"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentStart="true"
    android:layout_below="@+id/edit_adminPassword"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:text="@string/confirmPassword"/&gt;

&lt;EditText
    android:id="@+id/edit_adminPassword"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentTop="true"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:ems="10"
    android:inputType="textPassword"/&gt;
</code></pre>

<p></p>

<p>And here is what I am getting </p>

<p><a href="https://i.stack.imgur.com/mb0eB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mb0eB.png" alt="Here is what I am getting"></a></p>

<p>Is there something I am missing?</p>