Android: Display custom dialog in center of the container
<p>How to display custom dialog as a center of the container?</p>

<pre><code>Dialog customdialog = new Dialog(this,android.R.style.Theme_Translucent_NoTitleBar); 
Window window = customdialog.getWindow();
window.setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
window.setGravity(Gravity.CENTER);
</code></pre>

<p>R.style.Theme_Translucent_NoTitleBar - is used to remove border for cutomdialog. Once i used this line the dialog will appear at the topleft corner of the tablet?</p>

<p>Can anyone help me to solve this issue?</p>
