0

I created a CustomTextView that extends TextView, in the CustomTextView's constructor it has the following code:

Typeface tf = this.getTypeface();
boolean isBold = false;
boolean isItalic = false;
if(tf != null) {
    isBold = tf.isBold();
    isItalic = tf.isItalic();
} 

Here the isItalic and isBold are always false. Even after I defined android:textStyle="italic" in the layout file. What could be the problem?

Thanks Ray

Ray
  • 16,025
  • 5
  • 31
  • 51
  • 2
    Check out [this post](http://stackoverflow.com/questions/8954484/custom-fonts-and-custom-textview-on-android) – Leigh Jan 19 '15 at 20:22
  • Thank you, I got slightly different results but it is the right lead. I added comments in that thread detailing the situation I ran into. – Ray Jan 19 '15 at 22:58

0 Answers0