You can change the title of the dialog box if you set your own layout for both the dialog and the title. I used this method only to completely remove the header, but this should work for a custom header:
dialog = new Dialog(context);
Window window = dialog.getWindow();
window.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
dialog.setContentView(R.layout.my_dialog_layout);
window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.my_custom_header);
It's all more complicated (since you also need to customize the layout of the dialog box), but it's easier than subclassing Dialog.
source
share