Class TextUIConfig

  • public class TextUIConfig
    extends java.lang.Object
    A configurations of text. This provides a way of applying TextAppearance into this class's properties. A background color property is not applied automatically because background attributes is not a property of TextAppearance.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TextUIConfig.Builder  
    • Constructor Summary

      Modifier Constructor Description
      protected TextUIConfig​(Parcel in)
    • Method Summary

      Modifier and Type Method Description
      TextUIConfig apply​(TextUIConfig config)
      Apply values in the given TextUIConfig into this.
      SpannableString apply​(Context context, java.lang.String text)
      Apply values into given whole text.
      void bind​(Context context, Spannable spannable, int start, int end)
      Apply values into Spannable text.
      int describeContents()  
      Typeface generateTypeface()
      Generates typeface from text style.
      int getCustomFontRes()
      Returns a custom font res ID.
      java.lang.String getFamilyName()
      Returns a value of text typeface family.
      int getTextBackgroundColor()
      Returns a value of background color int.
      int getTextColor()
      Returns a value of text color int.
      int getTextSize()
      Returns a value of text size int.
      int getTextStyle()
      Returns a value of
      void mergeFromTextAppearance​(Context context, int textAppearance)
      Merge attributes into this instance's values by given TextAppearance.
      void mergeFromTextAppearance​(Context context, int textAppearance, int textBackgroundColor)
      Merge attributes into this instance's values by given TextAppearance and background color.
      void writeToParcel​(Parcel dest, int flags)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CREATOR

        public static final <any> CREATOR
    • Constructor Detail

      • TextUIConfig

        protected TextUIConfig​(@NonNull
                               Parcel in)
    • Method Detail

      • getTextBackgroundColor

        public int getTextBackgroundColor()
        Returns a value of background color int.
        A background color int value.
      • getTextColor

        public int getTextColor()
        Returns a value of text color int.
        A text color int value.
      • getTextStyle

        public int getTextStyle()
        Returns a value of
      • Typeface.NORMAL
      • Typeface.BOLD
      • Typeface.ITALIC
      • Typeface.BOLD_ITALIC
A text style of text.