Changing font size into an AlertDialog

后端 未结 7 2213
广开言路
广开言路 2020-12-04 22:10

I am trying to put some loooong text into an AlertDialog. The only issue the default font size that is really too big, so I want to make it smaller.

Here are all the

7条回答
  •  春和景丽
    2020-12-04 22:31

    I am using the following code to change the title and message text for AlertDialog…

    final int alertTitle = ctx.getResources().getIdentifier("alertTitle", "id", "android");
    setTitleFont((TextView) dlg.findViewById(alertTitle));
    setBodyFont((TextView) dlg.findViewById(android.R.id.message));
    

    … making sure that I check for null in my setTitleFont and setBodyFont methods.

提交回复
热议问题