title: Setting the size of a DialogFragment
body: <p>I have been trying many commands to setup the size of my <code>DialogFragment</code>. It only contains a color-picker, so I have removed the background and title of the dialog:</p>
  
  <pre><code>getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  getDialog().getWindow().setBackgroundDrawable(
      new ColorDrawable(android.graphics.Color.TRANSPARENT));
  </code></pre>
  
  <p>However I also want to position the dialog where I want and it is problematic. I use:</p>
  
  <pre><code>WindowManager.LayoutParams params = getDialog().getWindow().getAttributes();
  params.width = LayoutParams.WRAP_CONTENT;
  params.height =  LayoutParams.WRAP_CONTENT;
  params.gravity = Gravity.LEFT;
  getDialog().getWindow().setAttributes(params);
  </code></pre>
  
  <p>But one (big) obstacle remains: even though my dialog pane is invisible, it still has a certain size, and it limits the positions of my dialog. The <code>LayoutParams.WRAP_CONTENT</code> are here to limit the size of this pane to my color-picker, but for some reason it does not work.</p>
  
  <p>Has anyone been able to do something similar?</p>