I have created a custom alertdialog by the following code:
AlertDialog.Builder builder;
AlertDialog alertDialog;
LayoutInflater inflater = (LayoutInflater)ActivityName.this.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.custom_layout,(ViewGroup)findViewById(R.id.layout_root));
builder = new AlertDialog.Builder(getParent());
builder.setView(layout);
alertDialog = builder.create();
alertDialog.show();
Problem is the pop up is surrounded with the default Dialog background having a own void space of a title(as the title is not set). How do i remove this. I have tried putting custom style through ContextThemeWrapper like
builder = new AlertDialog.Builder(new ContextThemeWrapper(getParent(), R.style.CustomDialogTheme));
But its not working. How do i do that?!!! Thanks in Advance.
Custom style xml is given below:
<style name="CustomDialogTheme" parent="android:style/Theme.Dialog.Alert">
<item name="android:windowIsFloating">false</item>
<item name="android:windowNoTitle">true</item>
</style>

use following
Inflate your layout and set the view to content of dialog and