![](/img/trans.png)
[英]Android: How can I change the typeface of the message of a indeterminate ProgressDialog
[英]how to change android Progress Dialog message typeface?
誰能回答我的波紋管問題?
如何更改android進度對話框消息字體?
嘗試這種方式,為我工作:
首先在java類中,您必須導入以下代碼:
import android.text.Html;
然后把這行:
progressDialog.setMessage(Html.fromHtml(getString(R.string.progress_txt)));
代替這個:
progressDialog.setMessage("File downloading");
然后在strings.xml中這樣寫:
<string name="progress_txt">
<![CDATA[
<b><font face="serif">File downloading</font></b>
]]>
</string>
運行該應用程序,您會發現字體已經更改。
希望這個幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.