[paid] ( ͡❛ ͜ʖ ͡❛) Text Formater Extension

#Mr_Koder

Introducing

the TextFormater Extension by Mr.Koder

Are you looking to enhance the text formatting capabilities of your Kodular projects? Look no further!

We’re excited to introduce you to the TextFormater Extension, meticulously crafted by Mr.Koder, a passionate developer dedicated to simplifying your text manipulation needs.

TextFormater is a powerful and versatile extension designed to empower you with an array of text formatting tools, all at your fingertips. Whether you’re striving to beautify your app’s user interface or add interactive elements to your text, this extension is here to make your life easier.

Blocks

Events

TextClicked(AndroidViewComponent androidViewComponent, String clickedText):
An event that handles the click event of a clickable portion of the text. It dispatches the event with the clicked text as a parameter.

component_event

Methods



SetHyperlinkForTextComponent
This block is a remarkable one that allows you to make a portion of the text within a TextBox or Label in an Android app clickable as a hyperlink and when you click on it you will redirected to the linked URL to the hyperlink text.

Now you can add “Href” text like in HTML in the text with simple way.

Result:

Screenshot 2023-10-01 223842



ApplyCustomFontWithOptions
This Block allows you to apply a custom font with various styling options to a portion of text within a TextView or TextBox component,

It checks if the provided source is a valid file path. If it’s a file path, the custom font is loaded from that file. If not, it assumes that source is an asset file name and constructs the asset file path based on the package name.
in this example, I used material icons .otf file font :




before:


after:




Blocks:



ReplaceTextWithImage
This Block replaces a portion of text within a TextView or EditText component with an image loaded from either an asset or a file path. It offers customization options for the image’s dimensions.

before:


after:


Blocks:



ReplaceTextWithImageFromURL
This Block replaces a portion of text within a TextView or EditText component with an image loaded from image URL. It offers customization options for the image’s dimensions.

Note: This method needs memory space because it stores images loaded from their URLs. >You can locate these images in the package’s cache folder.

Block:



JustifyText
This Block justifies the text within a TextView component. It takes a single parameter:




before:


after:


Blocks:

blocks (1)



RemoveStyling(AndroidViewComponent androidViewComponent):
A function to remove all styling from the text in a TextView. It uses HtmlCompat.fromHtml to reset the text styling.

component_event



SetClickable(AndroidViewComponent androidViewComponent, int start, int end, int textColor, boolean underline): This function makes a specified portion of the text in a TextView clickable. It creates a ClickableSpan to handle the click event and set the text color and underline based on parameters.

Result:
Screenshot 2023-10-01 223842



SetUnderlineTextWithStyle , is designed to format a portion of the text within a TextView in an Android app. It allows you to apply different underline styles and colors to the specified text range.

Result:
Screenshot 2023-10-01 223842



SetTextMargins :
This blcok sets the left, right, top, and bottom margins (padding) for the text inside a TextView.
It adjusts the padding of the TextView, creating space around the text. This can be used to control the text’s positioning within the TextView.

component_event



SetTextShadowForTextComponent :
This block applies a shadow effect to a specified portion of the text in a TextView or TextBox.

Result:

Screenshot 2023-10-01 223842



SetTextBorderForTextComponent:
This function adds a border around a specified portion of the text in a TextView.

border styles : The style of the border, such as “dotted,” “dashed,” “solid,” “double,”

Result:
Screenshot 2023-10-01 223842



LinkfyTextComponent
block is a versatile tool for detecting and styling various types of content, such as URLs, emails, and numbers, within a TextBox or Label in an Android app.

component_event

Result:

Screenshot 2023-10-01 223842



GetEndPosForTextComponent :
This block retrieves the positions of the end (rightmost) character of each occurrence of a substring within the text content.

component_event




GetStartPosForTextComponent :
This block retrieves the positions of the start (leftmost) character of each occurrence of a substring within the text content.

component_event



BlurTextForTextComponent
block allows you to apply a blur effect to a specified portion of the text within a TextBox or Label in an Android app.

Result:

Screenshot 2023-10-01 223842



SetItalicTextForTextComponent :
This block allows you to make a portion of the text within a TextBox or Label appear in italic style.

Result:

Screenshot 2023-10-01 223842



HighlighTextComponent :
This block highlights a portion of the text in a TextBox or Label with a background color.

Results:

Screenshot 2023-10-01 223842



SetBoldTextForTextComponent :
This block applies bold formatting to a portion of the text within a TextBox or Label.


Result:
Screenshot 2023-10-01 223842



SetTextSizeForTextComponent :
This block sets the text size for a portion of the text within a TextBox or Label.

Result:

Screenshot 2023-10-01 223842



SetSubscriptTextForTextComponent :
This block allows you to apply a subscript style to a portion of the text within a TextBox or Label. Subscript text appears slightly below the normal text line.

Result:

Screenshot 2023-10-01 223842



SetSuperscriptTextForTextComponent :
This function allows you to apply a superscript style to a portion of the text within a TextBox or Label. Superscript text appears slightly above the normal text line.

Result:

Screenshot 2023-10-01 223842



ChangeColorOfTextForTextComponent :
This block allows you to change the color of a portion of the text within a TextBox or Label to a specified color.

Result:

Screenshot 2023-10-01 223842



SetHorizontalTextGradientForTextComponent :
This block applies a horizontal gradient to the entire text within a TextBox or Label, transitioning from the startColor to the endColor from left to right.

component_event

Result:

Screenshot 2023-10-01 223842



SetVerticalTextGradientForTextComponent :
Similar to the previous function, this one applies a vertical gradient to the entire text within a TextBox or Label, transitioning from the startColor to the endColor from top to bottom.

component_event



SetMonospaceText :
This block sets the text in a TextView or TextBox to use a monospace font (fixed-width font), which is often used for code or other situations where characters should align vertically.

component_event
result:
Screenshot 2023-10-01 223842



SetMonospaceTextWithOptions:
This block allows you to set text as monospace in a TextView or TextBox while customizing various options within a specified text range. You can set the monospace font, text color, and highlight color for the specified range.

Results:

Screenshot 2023-10-01 223842

Screenshot 2023-10-02 225352



SetStrikethroughText:
This block applies a strikethrough style to a portion of the text in a TextView or TextBox, allowing you to visually indicate that the text has been crossed out.

Result:

Screenshot 2023-10-01 223842



CapitalizeEachWord
this block allows you to apply CapitalizeEachWord effect of the label or text box content .

Results:

component_method



FormatText:
This block applies full formate styles to a portion of the text in a TextView or TextBox, allowing you to fully formate text check format syntax

this is the simplest way to format text at all

Result:

Aix file :

you can buy it from PayPal it only costs 2$ and after you pay you will automatically be directed to the download URL of AIX file

Mr.Koder

14 Likes

New blocks added

1 Like

Excellent extension thank you!

1 Like

This new block will be very useful, now you have all the blocks and options to create community app similar to kodular community you also just need any regex extension to do this, “enjoy

Hello, GetEndPosForTextComponent block is counting the string with +1. I used the subtraction block for the component to work.
the text (Text for Label26) has 16 characters including spaces. The GetEnd block contains 17 characters.

1 Like

Thanks @Daniel_R_Soares for reporting this issue I will update it.

1 Like

Extension updated to get the accurate end positions of occurrences of a substring in the content of a Label or TextBox without adding 1

1 Like

Hello,
It would be interesting if there was a block to capitalize the first letter of each word. Original (e.g. daniel rodrigues) Modified (e.g. Daniel Rodrigues)

No need for an extension, can be done easily with blocks

2 Likes

so cool I will update it to add this feature soon

1 Like

yes it can be done but for the whole text not only for a part of it ,
I WILL add this feature to apply this effect but on a part of text

1 Like

Thank you very much for your attention!

1 Like

@Daniel_R_Soares the effect of CapitalizeEachWord added .

1 Like

Thank you very much for adding this functionality! Can you send me the aix?

@Daniel_R_Soares
sent.

1 Like

Big new update , there is no easiest way from this to formate text

3 Likes