Reputation: 6128
I have a textview defined in xml, now i am setting the Typeface programmatically like this:
textView.setTypeface(APP_FONT_REGULAR); // which is custom font in assests (.ttf file).
now i have set android:textStyle="bold"
in xml
but it's not applying bold?
what is the reason i need to apply my own Typface and set it to bold also.
Upvotes: 0
Views: 266
Reputation: 33515
i need to apply my own Typface and set it to bold also.
You can set appearance when you call setTypeface()
like this
textView.setTypeface(APP_FONT_REGULAR, Typeface.BOLD);
it solve your problem. Check it out.
Upvotes: 1