开发者

android:how to set text view as bold by coding not via XML

开发者 https://www.devze.com 2023-02-28 06:08 出处:网络
I want to set text of TextView as Bo开发者_开发问答ld style from code instead of XML?for textview set bold by coding

I want to set text of TextView as Bo开发者_开发问答ld style from code instead of XML?


for textview set bold by coding

using this..

TextView.setTypeface(null, Typeface.BOLD);


textView.setTypeface(null, Typeface.BOLD_ITALIC);
textView.setTypeface(null, Typeface.BOLD);
textView.setTypeface(null, Typeface.ITALIC);
textView.setTypeface(null, Typeface.NORMAL);

And:

import android.graphics.Typeface;
0

精彩评论

暂无评论...
验证码 换一张
取 消