title: DialogFragment always wraps i'ts content and does not keep the min width as a alertdialog
body: <p>MyCustomDialogFragment always wraps it's content and does not keep the min width like a Alertdialog. How can I set the width to respond as a standard Android dialog ?</p>
  
  <p>This is the function I call to display the dialog:</p>
  
  <pre><code>      private void displayDialogEdit(String title, String edit,
  MyCustomEditDialog.MyCustomEditDialogListener listener, boolean onlyNumbers){
              MyCustomEditDialog dialog = MyCustomEditDialog.newInstance(title, edit, onlyNumbers);
              dialog.setInterface(listener);
              dialog.show(getSupportFragmentManager(), "edit");
          }
  </code></pre>
  
  <p>This is MyCustomDialogFragment.</p>
  
  <pre><code>public class MyCustomEditDialog extends DialogFragment {
  
      private MyCustomEditDialog.MyCustomEditDialogListener mInterface;
  
      public static MyCustomEditDialog newInstance(String title, String editText, boolean onlyNumbers){
          MyCustomEditDialog dialog = new MyCustomEditDialog();
          Bundle args = new Bundle();
          args.putString("title", title);
          args.putString("edit", editText);
          args.putBoolean("numbers", onlyNumbers);
          dialog.setArguments(args);
          return dialog;
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View v = inflater.inflate(R.layout.fragment_edit_dialog, container);
  
          getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  
  //        Bundle args = getArguments();
  //
  //        boolean numbers = args.getBoolean("numbers");
  //
  //        TextView txt = (TextView)v.findViewById(R.id.title);
  //        txt.setText(args.getString("title"));
  //
  //        final EditText edit = (EditText) v.findViewById(R.id.editText);
  //        edit.setText(args.getString("edit"));
  //
  //        if (numbers) edit.setInputType(InputType.TYPE_CLASS_NUMBER);
  //
  //        Button btn = (Button)v.findViewById(R.id.save);
  //
  //        btn.setOnClickListener(new View.OnClickListener() {
  //            @Override public void onClick(View view) {
  //                if (mInterface!=null) mInterface.customDialogOnClick(edit.getText().toString());
  //            }
  //        });
  //
  //        setCancelable(true);
  
          return v;
      }
  
      public void setInterface(MyCustomEditDialog.MyCustomEditDialogListener listener){
          this.mInterface = listener;
      }
  
  
      public interface MyCustomEditDialogListener {
          void customDialogOnClick(String result);
      }
  
  }
  </code></pre>
  
  <p>This is my layout for the custom 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:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingStart="@dimen/activity_horizontal_margin"
          android:paddingEnd="@dimen/activity_horizontal_margin"
          android:gravity="center_horizontal"
          android:paddingTop="10dp"
          android:paddingBottom="10dp"
          android:textColor="@color/blue_dark"
          android:textStyle="bold"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:text="Medium Text"
          android:layout_marginBottom="10dp"
          android:id="@+id/title"
          android:layout_gravity="center_horizontal" /&gt;
  
      &lt;EditText
          android:layout_marginStart="@dimen/activity_horizontal_margin"
          android:layout_marginEnd="@dimen/activity_horizontal_margin"
          android:layout_marginBottom="10dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/editText"
          android:inputType="text"
          /&gt;
  
      &lt;Button
          style="@style/btnBasic.blue"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/save"
          android:id="@+id/save" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Sample of result:</p>
  
  <p><a href="https://i.stack.imgur.com/HU5vc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HU5vc.png" alt="dialog small"></a></p>