Style IsCharPara

boolean b;

// Check if character-based attribute
b = StyleConstants.Italic instanceof AttributeSet.CharacterAttribute;      // true
b = StyleConstants.LineSpacing instanceof AttributeSet.CharacterAttribute; // false

// Check if paragraph-based attribute
b = StyleConstants.LineSpacing instanceof AttributeSet.ParagraphAttribute; // true
b = StyleConstants.Italic instanceof AttributeSet.ParagraphAttribute;      // false

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.