about text in the message there is not problem. I can't change (personalize) color, font, style of Title of alertdialog?
What's the way?
thanks!
about text in the message there is not problem. I can't change (personalize) color, font, style of Title of alertdialog?
What's the way?
thanks!
There is another way to set a new custom view to a dialog title. We can define every custom view such as
TextView
and add it some custom properties and set it to the dialog title:Here, I define a dynamic
TextView
and set some properties to it. Finally, I set it to dialog title usingsetCustomTitle()
.Let's take example of this customised Dialog. Below are the files used to make it :
res/layout/dialog.xml :
res/layout/activity_main.xml
MainActivity.java :
This is how you can make a customised dialog, and customise the components of that dialog. Here I have set a custom font to the title of the Dialog.
Check out this link: Creating dialogs
This should help.
Or this Alert Dialog Builder
Here is an full example how i would do it. See the last line of code.
About font size you can use this:
or