Change user header dialog to AlertDialog '

I created a custom dialog and I want the title to have a background similar to AlertDialog.

Better to say:

Location where User Dialog is indicated

alt text

It is required to have a title as follows:

alt text

I do not want to just add an image to the text, but actually implement the full style of the user interface.

Is it possible?

Here's the code I used for my custom dialog: Adding an image to the custom notification dialog

+5
source share
2 answers

Galip is the code that worked for me

Dialog dialog = new Dialog(context);

dialog.setContentView(R.layout.dialoglayout);

dialog.setTitle("Pick A Colour");

RadioGroup

, .

+5

, AlertDialog.Builder?

AlertDialog.Builder builder = new AlertDialog.Builder( activity );
builder.setTitle( title );
builder.setView( /* Your custom view here */ );

// optional
builder.setPositiveButton( R.string.button_ok, listener );
builder.setNegativeButton( R.string.button_cancel, listener );

AlertDialog alert = builder.create();
alert.show();

.

0

All Articles