To check if textview is BOLD and ITALIC, use the following code:
if((textView.getTypeface().getStyle() & Typeface.BOLD)!=0 &&(textView.getTypeface().getStyle() & Typeface.ITALIC)!=0){
}
To check if textview is BOLD or ITALIC, use the following code:
if((textView.getTypeface().getStyle() & Typeface.BOLD)!=0 ||(textView.getTypeface().getStyle() & Typeface.ITALIC)!=0){
source share