title: Set custom dialog height and width
body: <p>I am making a custom dialog of which I want height and width to be default fit to all screen sizes.</p>
  
  <p>But it is not happening so.
  The dialog is appearing very small though.
  THis is the XML for the dialog</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:background="#D24379"
  android:orientation="vertical" &gt;
  
  &lt;TextView
      android:id="@+id/txt_dia"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_margin="10dp"
      android:textColor="@android:color/white"
      android:textSize="15dp"
      android:textStyle="bold" &gt;
  &lt;/TextView&gt;
  
   &lt;LinearLayout
      android:id="@+id/layButton"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_margin="5dp"
      android:orientation="horizontal" &gt;
  
      &lt;Button
          android:id="@+id/yesButton"
          android:layout_width="0.0dip"
          android:layout_height="wrap_content"
          android:layout_weight="1.0"
          android:background="#ffffff"
          android:text="@string/yes" /&gt;
  
      &lt;Button
          android:id="@+id/noButton"
          android:layout_marginLeft="5dp"
          android:layout_width="0.0dip"
          android:background="#ffffff"
          android:layout_height="wrap_content"
          android:layout_weight="1.0"
          android:text="@string/no" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>this is my dialog class </p>
  
  <pre><code>public class CustomDialogClass extends Dialog implements
              android.view.View.OnClickListener {
  
          public Activity c;
          public Dialog d;
          public Button yes, no;
          public TextView content;
  
          public CustomDialogClass(Activity a) {
              super(a);
              this.c = a;
          }
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              requestWindowFeature(Window.FEATURE_NO_TITLE);
              setContentView(R.layout.custom_dialog);
              yes = (Button) findViewById(R.id.yesButton);
              no = (Button) findViewById(R.id.noButton);
              content=(TextView)findViewById(R.id.txt_dia);
              yes.setOnClickListener(this);
              no.setOnClickListener(this);
  
          }
  
          @Override
          public void onClick(View v) {
              switch (v.getId()) {
              case R.id.yesButton:
  
                  break;
              case R.id.noButton:
                  dismiss();
                  break;
              default:
                  break;
              }
              dismiss();
          }
        }
  </code></pre>
  
  <p>How do I set the height and width to appear a default size such that it appears perfect on all screen size.</p>
  
  <p>I am a getting a very small dialog.</p>