title: Android custom design Dialog prob without title bar
body: <p>I using following xml to design a custom Dialog.</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:background="@drawable/wound_screener_bg"
      android:layout_height="match_parent" &gt;
  
      &lt;TextView 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textStyle="bold"
          android:paddingTop="15dp"
          android:paddingRight="70dp"
          android:textColor="#5A5C5E"
          android:paddingLeft="70dp"
          android:id="@+id/bodyPartText"
          android:layout_centerHorizontal="true"
          android:text="You selected the arm"/&gt;
      &lt;TextView 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textStyle="normal"
          android:paddingTop="5dp"
          android:paddingBottom="5dp"
          android:textColor="#727576"
          android:id="@+id/confirmText"
          android:layout_below="@id/bodyPartText"
          android:layout_centerHorizontal="true"
          android:text="Is that correct?"/&gt;
      &lt;View 
          android:layout_width="15dp"
          android:layout_height="1dp"
          android:layout_below="@id/confirmText"
          android:layout_centerHorizontal="true"
          android:id="@+id/buffer"&gt;&lt;/View&gt;
      &lt;Button 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="YES"
          android:paddingTop="10dp"
          android:paddingBottom="10dp"
          android:paddingRight="30dp"
          android:paddingLeft="30dp"
          android:background="#DDDDDD"
          android:textColor="#EB9093"
          android:id="@+id/yesBtn"
          android:layout_below="@id/confirmText"
          android:layout_toLeftOf="@id/buffer"/&gt;  
      &lt;Button 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="NO"
          android:paddingTop="10dp"
          android:paddingBottom="10dp"
          android:paddingRight="30dp"
          android:paddingLeft="30dp"
          android:id="@+id/noBtn"
          android:background="#DDDDDD"
          android:textColor="#EB9093"
          android:layout_below="@id/confirmText"
          android:layout_toRightOf="@id/buffer"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Now I using following code to display the dialog box.</p>
  
  <pre><code>Dialog dialog = new Dialog(this);
  dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  dialog.setContentView(R.layout.bodypart_comfirm);
  
  
  TextView bodyPartText = (TextView) dialog.findViewById(R.id.bodyPartText);
  Button yesBtn = (Button) dialog.findViewById(R.id.yesBtn);
  Button noBtn = (Button) dialog.findViewById(R.id.noBtn);
  
  bodyPartText.setText("You selected the " + partName);
  
  noBtn.setOnClickListener(new OnClickListener() {
   @Override
   public void onClick(View v) {
     dialog.dismiss();
   }
  });     
  
  yesBtn.setOnClickListener(new OnClickListener() {
   @Override
   public void onClick(View v) {
     .............
     .............
  
   }
  });
  
  dialog.show();
  </code></pre>
  
  <p>It gives a dialog like below.
  <img src="https://i.stack.imgur.com/OanWJ.png" alt="enter image description here"></p>
  
  <p>Now if I remove the line of "dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);", it gives the proper design, but with the title-bar, but I do not the title bar.</p>
  
  <p><img src="https://i.stack.imgur.com/11ui4.png" alt="enter image description here"></p>
  
  <p>What is the problem in my code? How to solve it?</p>