title: How to make DialogFragment width to Fill_Parent
body: <p>I am working on an android application where I am using <code>DialogFragment</code> to display the dialog but its width is very small. How I can make this width to <code>fill_parent</code> to it ?</p>
  
  <pre><code>public class AddNoteDialogFragment extends DialogFragment {
  
      public AddNoteDialogFragment() {
          // Empty constructor required for DialogFragment
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          getDialog().setTitle(getString(R.string.app_name));
          View view = inflater.inflate(R.layout.fragment_add_note_dialog,
                  container);
  
          return view;
      }
  
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
          Dialog dialog = super.onCreateDialog(savedInstanceState);
  
          // request a window without the title
          dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  
          return dialog;
      }
  }
  </code></pre>
  
  <p>fragment_add_note_dialog.xml</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="match_parent"
      android:background="@android:color/white"
      android:orientation="vertical"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin" &gt;
  
      &lt;EditText
          android:id="@+id/addNoteEditText"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="top"
          android:hint="@string/clock_enter_add_note"
          android:imeOptions="actionDone"
          android:inputType="textCapSentences|textMultiLine"
          android:lines="5" /&gt;
  
      &lt;Button
          android:id="@+id/submit"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="10dp"
          android:background="@drawable/login_button"
          android:text="@string/submit_button"
          android:textColor="@android:color/white" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/M1htQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/M1htQ.png" alt=""></a></p>