如何改变Android的进度对话框消息字体? [英] how to change android Progress Dialog message typeface?
本文介绍了如何改变Android的进度对话框消息字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能回答我的问题,波纹管?
Who can answer my bellow question ?
如何改变Android的进度对话框消息字体?
how to change android Progress Dialog message typeface?
推荐答案
试试这个办法,工作对我来说:
Try this way , worked for me :
先在java类,你必须导入这样的:
First in java class you have to import this :
import android.text.Html;
然后把这个行:
progressDialog.setMessage(Html.fromHtml(getString(R.string.progress_txt)));
而不是这样的:
progressDialog.setMessage("File downloading");
然后strings.xml中写,因为这:
then in strings.xml write it as this :
<string name="progress_txt">
<![CDATA[
<b><font face="serif">File downloading</font></b>
]]>
</string>
运行应用程序,你会发现字体已经改变。
run the app you will find typeface already changed .
希望这有助于
这篇关于如何改变Android的进度对话框消息字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文