title: AlertDialog setMessage cut off
body: <p>I'm currently looking over some app demos given from a book and this particular app which utilizes AlertDialog is acting very strange in that it overlaps the layout with the message and its only happening when it uses this particular layout. I've tried running the app on both an emulator and real device with the same results. Any help towards solving this problem is appreciated!
  <a href="https://i.stack.imgur.com/MK523.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MK523.png" alt=""></a></p>
  
  <p>Here is the dialog class.</p>
  
  <pre><code>    package android.bignerdranch.com.notetoself;
  
  import android.app.AlertDialog;
  import android.app.Dialog;
  import android.app.DialogFragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.widget.Button;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  public class DialogShowNote extends DialogFragment {
  
      Note mNote;
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
  
          AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
  
          LayoutInflater inflater = getActivity().getLayoutInflater();
          View dialogView = inflater.inflate(R.layout.dialog_show_note, null);
  
          TextView txtTitle = (TextView) dialogView.findViewById(R.id.txtTitle);
          TextView txtDescription = (TextView) dialogView.findViewById(R.id.txtDescription);
          txtTitle.setText(mNote.getTitle());
          txtDescription.setText(mNote.getDescription());
  
          ImageView ivImportant = (ImageView) dialogView.findViewById(R.id.imageViewImportant);
          ImageView ivTodo = (ImageView) dialogView.findViewById(R.id.imageViewTodo);
          ImageView ivIdea = (ImageView) dialogView.findViewById(R.id.imageViewIdea);
  
          if (!mNote.isImportant()){
              ivImportant.setVisibility(View.GONE);
          }
  
          if (!mNote.isTodo()){
              ivTodo.setVisibility(View.GONE);
          }
  
          if (!mNote.isIdea()){
              ivIdea.setVisibility(View.GONE);
          }
  
          Button btnOK = (Button) dialogView.findViewById(R.id.btnOK);
  
          builder.setView(dialogView).setMessage("Your mNote");
  
          btnOK.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  dismiss();
              }
          });
  
          return builder.create();
      }
  
  
      public void sendNoteSelected(Note noteSelected) {
          mNote = noteSelected;
      }
   }
  </code></pre>
  
  <p>And its associated layout.</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"
                      android:paddingLeft="10dp"
                      android:paddingTop="10dp"
                      android:paddingRight="10dp"
                      android:paddingBottom="20dp"&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageViewImportant"
              android:layout_alignParentTop="true"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:src="@drawable/ic_warning_black_24dp" /&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageViewTodo"
              android:layout_alignParentTop="true"
              android:layout_toRightOf="@+id/imageViewImportant"
              android:layout_toEndOf="@+id/imageViewImportant"
              android:src="@drawable/ic_check_box_outline_blank_black_24dp" /&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageViewIdea"
              android:layout_alignParentTop="true"
              android:layout_toRightOf="@+id/imageViewTodo"
              android:layout_toEndOf="@+id/imageViewTodo"
              android:src="@drawable/ic_wb_incandescent_black_24dp" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:text="Large Text"
              android:id="@+id/txtTitle"
              android:layout_below="@+id/imageViewIdea"
              android:layout_centerHorizontal="true"
              android:layout_marginTop="27dp" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="New Text"
              android:id="@+id/txtDescription"
              android:layout_marginTop="34dp"
              android:layout_below="@+id/txtTitle"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true" /&gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="OK"
              android:id="@+id/btnOK"
              android:layout_alignParentBottom="true"
              android:layout_alignLeft="@+id/txtTitle"
              android:layout_alignStart="@+id/txtTitle"
              android:layout_marginBottom="28dp" /&gt;
      &lt;/RelativeLayout&gt;
  </code></pre>