Eagle_Eye Eagle_Eye - 1 year ago 76
Android Question

Change Title Font Of Alert Dialog Box Android

I Want To Change The Font Of The Title Of Alert Dialog Box..

Can Anybody Tell How Can I Do It..?

Any Help Would Be Appreciated..

Answer Source

I found a simple solution..

At first I was setting the title of my alert box by

builder.setTitle("My Title");

So I was not able to change the font of it..

Then what worked for me is..

I created a simple TextView :

TextView tv2;

And set all properties of TextView which I wanted...

And then I replaced my

builder.setTitle("My Title");

line with


and now I can change Title Color, Font Etc By Changing tv2's Properties..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download