How to remove the title in Dialog?

Use this code when creating a dialog:

requestWindowFeature(Window.FEATURE_NO_TITLE);

For Me following worked :

<style name="MyActivityDialogTheme" parent="Base.Theme.AppCompat.Light.Dialog">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

Use This Code

final Dialog dialog = new Dialog(context);
    dialog.getWindow();
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);       
    dialog.setContentView(R.layout.yourlayout);
    dialog.show();

if Dialog ..............

Dailog dialog = new Dialog(MainActivity.this, R.style.mydialogstyle);

res-->values-->mydialog.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="mydialogstyle" parent="android:style/Theme.Dialog">
        <item name="android:windowBackground">@null</item>
        <item name="android:windowNoTitle">false</item>
    </style>
</resources>

Tags:

Android

Dialog