1

Here's my code for the custom dialog box I've implemented

            final Dialog dialog = new Dialog(context);
    dialog.setContentView(R.layout.custom_dialog);
    dialog.setTitle("This is the Title");
    TextView text = (TextView) dialog.findViewById(R.id.text);
    text.setTypeface(Typeface.createFromAsset(getAssets(), 
            "fonts/Barkentina.otf"));

I'm easily able to change the font of the text inside dialogue box. But what can I do to change the font of dialog title?

MAK
  • 1,250
  • 21
  • 50

1 Answers1

1

If you want to override the font in your entire application then you can follow this answer.

As per your approach you can follow this answer which uses R.id.alertTitle to find the alter dialog title id. Then you can set typeface to the TextView with the id.

Community
  • 1
  • 1
bpr10
  • 1,086
  • 8
  • 14