java– 如何使TextView加粗?

java– 如何使TextView加粗?,第1张

概述我希望能够使TextView变粗.这就是我设置它的外观(我需要在代码中执行此 *** 作):nameText.setTextAppearance(getApplicationContext(),R.style.BlueText);priceText.setTextAppearance(getApplicationContext(),R.style.BlueText);changeText.setTextAppearance(getApplicationC

我希望能够使TextVIEw变粗.这就是我设置它的外观(我需要在代码中执行此 *** 作):

nameText.setTextAppearance(getApplicationContext(), R.style.BlueText);priceText.setTextAppearance(getApplicationContext(), R.style.BlueText);changeText.setTextAppearance(getApplicationContext(), R.style.BlueText);

这是我的style.xml

  <!-- Blue color -->   <style name="BlueText">        <item name="androID:textcolor">#4871A8</item>    </style>

如何确保我的TextVIEw加粗

解决方法:

  <!-- Blue color -->   <style name="BlueText">        <item name="androID:textcolor">#4871A8</item>        <item name="androID:textStyle">bold</item>    </style>

总结

以上是内存溢出为你收集整理的java – 如何使TextView加粗?全部内容,希望文章能够帮你解决java – 如何使TextView加粗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1115872.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存