Textview Isbold Always Returns Normal
I am setting Typeface of a textview like this textView.setTypeface(tf_roboto_medium, Typeface.BOLD); When I check the style using this command, it is evaluated true. if (textView.
Solution 1:
Try one of these this:
if (textView.getTypeface().isBold()) {
if ((textView.getTypeface().getStyle() & Typeface.BOLD) > 0) {
From what I see there is a bit mask used for font styles. Normal == 0 so there can be problems with 0 & 0
Post a Comment for "Textview Isbold Always Returns Normal"