Is it possible to change the font size and make text bold which is displayed in a ProgressDialog .I have created a ProgressDialog like this:
private ProgressDialog dialog;
this.dialog = ProgressDialog.show(Activity.this, "Heading","Message...", true);
I want to make Heading bold and increase the font size..pls help
If you import android.text.Html; then you will be able to use the Html.fromHtml() method to do it, like so:
private ProgressDialog dialog;
this.dialog = ProgressDialog.show(Activity.this, Html.fromHtml(
"<b>Heading<b>"), Html.fromHtml("<big>Message...</big>"), true);
You should also be able to use other Html text formatting tags like <small> <u> <i> <sub> etc., and obviously you can mix and match them like any other html text.
来源:https://stackoverflow.com/questions/6595390/android-progressdialog-fontsize-change