title: Changing position of the Dialog on screen android
body: <p>I made a simple <code>AlertDialog</code> in my <strong>Activity</strong>:</p>
  
  <pre><code>View view = layoutInflater.inflate(R.layout.my_dialog, null);
  AlertDialog infoDialog = new AlertDialog.Builder(MyActivity.this)
                      .setView(view)  
                      .create();
  
  infoDialog.show();
  </code></pre>
  
  <p>With above code, the <strong>dialog</strong> shows at the (about) the center of the screen. </p>
  
  <p>I am wondering, how can I customize the dialog position to make it showing just under the top Action Bar ? (Is there anyway to change the gravity or something of the dialog?) and how to do it based on my code??</p>