我希望能够使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>