First, when I ran into this problem, I tried to use supportRequestWindowFeature(Window.FEATURE_NO_TITLE); but it didn’t work for me and it didn’t influence.
An alternative method to remove the panel at the top of the activity of the dialog box is to create a custom style and apply it to this activity.
In styles.xml create a new style:
<style name="MyCustomDialog" parent="Base.Theme.AppCompat.Light.Dialog"> <item name="android:windowNoTitle">true</item> <item name="windowActionBar">false</item> </style>
Now in AndroidManifest.xml add android:theme="@style/MyCustomDialog" to your activity.
Of course, MyCustomDialog can be renamed to anything.
source share