Android设置文字粗体的方法:
testTextView=(TextView) findViewById(R.id.testTextView);
testTextView.getPaint().setFakeBoldText(true);
英文和数字可以直接用XML去设置:
android:textStyle="bold"
本文介绍了在 Android 开发中如何使 TextView 中的文字显示为粗体。通过使用 Java 代码设置 Paint 对象的 setFakeBoldText 方法或者直接在 XML 布局文件中设置 textStyle 属性来实现文字加粗效果。
Android设置文字粗体的方法:
testTextView=(TextView) findViewById(R.id.testTextView);
testTextView.getPaint().setFakeBoldText(true);
英文和数字可以直接用XML去设置:
android:textStyle="bold"
5823
737

被折叠的 条评论
为什么被折叠?
