ToolBox
The ToolBox extension is a powerful utility toolkit designed to simplify common app development tasks and enhance user interaction in Kodular projects. With this extension, developers gain access to a versatile set of features, including dynamic text animation, smart variable replacement, and customizable case-result logic—all in one compact component.
Specifications
Package: com.syntax.toolbox
Size: 7.98 KB
Minimum API Level: 7
Updated On: 2025-04-29T18:00:00Z
Built & documented using: FAST-CLI
Features Overview
Animated Text Transitions
- Animate text updates in a
TextView
with a smooth vertical slide and fade effect. - Automatically detects and animates only when the text changes.
- Makes UI changes feel modern and responsive.
Dynamic Variable Parsing
- Define dynamic variables with
SetVariable(tag, value)
. - Parse any string and replace placeholders like
%tag%
with their corresponding values usingParseText(text)
. - Ideal for templating, localization, or dynamic content generation.
Custom Case–Result Logic (Switch Case Alternative)
- Add case mappings using
AddCase(key, value)
and define a fallback usingSetDefaultValue(value)
. - Retrieve results using
GetResult(key)
, which automatically fires an event (WhenResultFound
) indicating whether the default was used. - Optional
SetAutoClear(true)
allows one-time use logic (useful in state-driven apps).
Case Management
HasCase(key)
to check for the presence of a case.GetAllCases()
returns a list of all keys.Clear()
resets all cases and the default value.
Practical Use Cases
- Smoothly update chat messages, headlines, or dynamic labels.
- Build localized or customizable strings for different users.
- Create simplified decision trees or response systems.
- Replace cluttered “if-then” or “select list” blocks with a cleaner case-result approach.
Events:
WhenResultFound
Triggered when a result is found.
Parameter | Type |
---|---|
key | any |
value | any |
isDefault | boolean |
Methods:
SetTarget
Set the TextView component to animate
Parameter | Type |
---|---|
component | component |
SetText
Animate text change
Parameter | Type |
---|---|
newText | text |
SetVariable
Set a variable by tag and value
Parameter | Type |
---|---|
tag | text |
value | text |
ParseText
Parse text and replace %tag% with stored values
Parameter | Type |
---|---|
inputText | text |
Return Type: text
AddCase
Add a case with a value.
Parameter | Type |
---|---|
key | any |
value | any |
SetDefaultValue
Set the default value if no case matches.
Parameter | Type |
---|---|
value | any |
SetAutoClear
Set whether to automatically clear cases after GetResult.
Parameter | Type |
---|---|
enabled | boolean |
GetResult
Get result based on input key.
Parameter | Type |
---|---|
key | any |
Return Type: any
HasCase
Check if a case exists.
Parameter | Type |
---|---|
key | any |
Return Type: boolean
GetAllCases
Get a list of all case keys.
Return Type: list
Clear
Clear all cases and reset default value.
Properties:
Text
Get current text
Download LInk:
com.syntax.toolbox.aix (8.0 KB)
Example:
Blocks
Why Use ToolBox?
- Reduces block complexity and repetitive logic.
- Enhances UI with native Android animations.
- Modular design allows clean integration into any project.
- Suitable for both beginners and advanced Kodular developers.
Donations are welcome here.[dm plz]
Ideas are welcome,
Submit issues.
For getting additional supports, text me in PM or drop a comment below.
This documentation was generated using Akshat Developer’s Documentation Generator.