Custom: Icon, Radius, Border, Color, Gradient, HTML Text, Text Alignment.
SetButton
Initialize the button with the values you set, the image shows how to do it.
Color input can be in Hexadecimal, RGB, and AI2 color blocks.
SetButtonShadow
Sets shadow behind the button.
Sets a list of lists with the values for the shadow.
- I made the Shadow function to show in which position the values go and for greater convenience.
- But you can also pass just a list instead of the Shadow function.
Example of List
Shadow
Adds shadow to buttons.
Details
color
: Shadow color, in RGB, Hexadecimal or AI2 color blocks.spread
: Shadow distance.offsetX
: Horizontal offset of the shadow.offsetY
: Vertical offset of the shadow.opacity
: Opacity of the shadow, starting from 0.1.blur
: It's recommended to set the value to 12.
It's recommended to set minimum values so that the shadow is not too large, since it will make the button reduce its size taking its place.
RemoveButtonShadow
Removing the shadow increases the size of the button. Recommendation: If you add a shadow, don't remove it unless you configure the button correctly.
I have it in mind to fix it, but I don't know when yet.
ChangesButtonColors
Changes button colors dynamically.
Remember that you can put transparent buttons.
SetHtmlTextWithAlignments
Add text in html and alignment.
Alignment options:
center
, left
, right
, top
, bottom
.
Screenshots with examples of buttons with and without HTML and alignment.
And the button below with transparency.
Update v1.0.3
Mar 22, 2025.
-
The buttonShadows parameter has been separated from the SetButton function.
-
Helper blocks have been added for the
imagePosition
parameter of theSetButton
function and thealignments
parameter of theSetHtmlTextWithAlignments
function. -
Previously, the button only accepted two input colors; you couldn't enter more or less colors without getting an error.
- Now, the button can accept one color or more than two colors for a gradient.
-
A function has been added to dynamically change the button's color.
-
A function has been added to remove the shadow. (Removing the shadow increases the button's size.) Recommendation: If you add a shadow, don't remove it unless you configure the button correctly.
-
A function has been added to add HTML text and alignment.
aiaProject:
Button.aia (31.1 KB)
Extension v1.0.3.
joejsanz.joedevbutton.aix (17.4 KB)
minSdk: 21
maxSdk: 34
JDK: 11
Built using: FAST-CLI v2.7.0
Thanks