Class ContentEditingStylingBar

    • Constructor Detail

      • ContentEditingStylingBar

        ContentEditingStylingBar(Context context)
      • ContentEditingStylingBar

        ContentEditingStylingBar(Context context, AttributeSet attrs, int defStyleAttr)
      • ContentEditingStylingBar

        ContentEditingStylingBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
    • Method Detail

      • isDisplayed

         boolean isDisplayed()

        True when content editing bar is currently displayed on the screen.

      • unbindController

         void unbindController()

        Unbinds from content editing controller. Animates content editing bar out of view.

      • getBackgroundColor

         int getBackgroundColor()

        Returns background color set to the content editing bar.

        Returns:

        Background color applied to this content editing bar.

      • setBackgroundColor

         void setBackgroundColor(int backgroundColor)

        Sets background color to the content editing bar.

        Parameters:
        backgroundColor - Background color to be applied to this content editing bar.
      • setFontNameText

         void setFontNameText(@NonNull() String fontName, boolean isFontResolved)

        Sets the name of the font

        Parameters:
        fontName - the current font name
        isFontResolved - indicates if we have a proper font match.
      • setFontSizeText

         void setFontSizeText(String fontSize, String fontSizeUnit)

        Sets the size of the font

        Parameters:
        fontSize - the current font size
        fontSizeUnit - the current font size unit used like pt
      • setTextColor

         void setTextColor(int textColor)

        Sets color of the text on this content editing bar and the font color image

        Parameters:
        textColor - Text color on content editing bar.
      • setIconsColor

         void setIconsColor(int iconColor)

        Sets color of the icons on this content editing styling bar.

        Parameters:
        iconColor - Tint of the icons on the bar.
      • setFontButtonsColor

         void setFontButtonsColor(int fontButtonsColor)

        Sets the background color of the font name and size buttons

        Parameters:
        fontButtonsColor - the background color to use for the font buttons.
      • setFontButtonsColorChecked

         void setFontButtonsColorChecked(int fontButtonsColorChecked)

        Sets the checked background color of checkable buttons (bold/italic)

        Parameters:
        fontButtonsColorChecked - the checked background color to use for the buttons.
      • setIconBorderColor

         void setIconBorderColor(int iconBorderColor)

        Sets the color of the border around the font icon filled image

        Parameters:
        iconBorderColor - the color of the border around the font icon filled image
      • onContentSelectionChange

         void onContentSelectionChange(UUID contentId, int selStart, int selEnd, StyleInfo styleInfo, boolean styleWasChanged)

        Called when the cursor position/selection has changed Mainly used to update the content editing toolbar to show the proper text style for the current cursor position.

        Parameters:
        contentId - id of the content block
        selStart - start position of the selection
        selEnd - end position of the selection, also the cursor position
        styleInfo - style info of the content block
      • onStartEditingContentBlock

         void onStartEditingContentBlock(UUID contentId)

        Called when the provided block goes into editing mode (need to change the frame style and display the editing widget now)

        Parameters:
        contentId - id of the content block
      • onFinishEditingContentBlock

         void onFinishEditingContentBlock(UUID contentId)

        Called when the provided block goes out of editing mode (loses focus, or global content editing mode is being finished)

        Parameters:
        contentId - id of the content block
      • onTextBlockStyleChange

         void onTextBlockStyleChange(UUID contentId, TextBlockStyleInfo textBlockStyleInfo)

        Called when a style that affects the whole textblock has successfully been changed.

        Parameters:
        contentId - id of the changed content block
        textBlockStyleInfo - style info of the changed content block