title: Android Dialog fragment eliminate black borders (top & bottom)
body: <p>Need to eliminate top and bottom borders from a dialog fragment. How do you do it?</p>
  
  <pre><code>    AlertDialog.Builder builder = new AlertDialog.Builder(activity);
      builder.setCancelable(true);
  
      LayoutInflater inflater = LayoutInflater.from(activity);
      View view = inflater.inflate(R.layout.variants_dialog, null);
  
      // setup views
      setupListView(view);
      ...
  
      builder.setView(view);
      return builder.create(); // HERE I HAVE TOP &amp; BOTTOM BLACK BORDERS
  </code></pre>
  
  <hr>
  
  <p>This doesnt do nothing:</p>
  
  <pre><code>        builder.setView(view);
          AlertDialog result = builder.create();
          result.getWindow().setBackgroundDrawable(new ColorDrawable());
          return result;
  </code></pre>
  
  <hr>
  
  <p>There is no such method:</p>
  
  <pre><code>         dialog.setView(layout, 0, 0, 0, 0);
  </code></pre>