Description
Hello everyone,
Today i introduce my second extension which is component tools extension. This extension allows you to get and set some components features, move the component and reposition it, And much more!
important: may be you find some blocks which exists in kodular. Those blocks are made for app inventor users ( i will post a similar topic on their community )
Blocks picture
Documantation
I didn’t put the methods documentation that already exist in kodular ( not so much only 5)
Error
This event is triggered when an error occurs.
Error ~ String
MoveCanceled
This event is triggered when the current movement cancels.
MoveCompleted
This event is triggered when the current movement ends.
MoveStarted
This event is triggered when the current movement ends.
CancelMovement
Cancels The current movement.
PauseMovement
Pauses The current movement.
ResumeMovement
Resumes The current movement.
IsMovementRunning
Returns true if the current movement is running at the moment. ( not completed, ended or paused.)
IsMovementPaused
Returns true if the current movement is paused at the moment. ( not running, canceled, ended or resumed.)
MoveHorizontally
Moves the component in horizontal way. may be it sounds like overshot component block.Well may be it results same result but its different .
px ~ int
component ~ component
duration ~ int ( in milliseconds )
MoveVertically
Moves the component in vertical way. may be it sounds like overshot component block.Well may be it results same result but its different .
px ~ int
component ~ component
duration ~ int ( in milliseconds )
MoveInCustomPath
Moves the component in fully customizable path.
component ~ component
duration ~ int ( in milliseconds )
Left ~ int
Top ~ int
Right ~ int
Bottom~ int
StartAngle ~ int
SweepAngle ~ int
ForceMoveTo ~ int
PerformClick
Performs a click on any component you want .
component ~ component
PerformLongClick
Performs a long click on any component you want .
component ~ component
SetBottomPosition
Sets the bottom position of any component you want .
component ~ component
SetRightPosition
Sets the right position of any component you want .
component ~ component
right ~ int
SetLeftPosition
Sets the left position of any component you want .
component ~ component
left ~ int
SetTopPosition
Sets the top position of any component you want .
component ~ component
top ~ int
SetRotation
Sets the rotation of any component you want .
component ~ component
rotation ~ int
SetRotationX
Sets the rotation X of any component you want .
component ~ component
rotationX ~ int
SetRotationY
Sets the rotation Y of any component you want .
component ~ component
rotationY ~ int
SetScaleX
Sets the Scale X of any component you want .
component ~ component
ScaleX ~ int
SetScaleY
Sets the Scale Y of any component you want .
component ~ component
ScaleY ~ int
SetShadowElevation
Sets the Shadow elevation of any component you want .
component ~ component
shadowElevation ~ int
SetX
Sets the X position of any component you want .
component ~ component
x ~ int
SetY
Sets the y position of any component you want .
component ~ component
y ~ int
GetX
Gets the x position of any component you want .
component ~ component
GetY
Gets the y position of any component you want .
component ~ component
RegisterComponent
Register component so the extension can detect touches on it.
Component ~ Component
Touched
This event is triggerred when a component is touched.The action is returned in the action parameter.
Component ~ Component ( the component which is clicked )
info ~ String ( A detailed info about the touch in json format )
x ~ int ( X positions of the first touch place )
y ~ int ( Y positions of the first touch place )
action ~ String ( Action name of the action occurred.)
Thanks for @Zia_Choudhary and @themaayur
Valid action types
ACTION_BUTTON_PRESS
ACTION_BUTTON_RELEASE
ACTION_CANCEL
ACTION_DOWN
ACTION_HOVER_ENTER
ACTION_HOVER_EXIT
ACTION_HOVER_MOVE
ACTION_MASK
ACTION_MOVE
ACTION_OUTSIDE
ACTION_POINTER_DOWN
ACTION_POINTER_INDEX_MASK
ACTION_POINTER_INDEX_SHIFT
ACTION_POINTER_UP
ACTION_SCROLL
ACTION_UP
SetZ
Sets the Z position of any component you want.
Component ~ Component
z ~ int
Thanks for @broekmancompany
GetZ
Gets the Z position of any component you want.
Component ~ Component
Thanks for @broekmancompany
The extension also have some get padding blocks and get scale x and get scale y… Also get rotation rotation Y, and rotation X… Also i have get top, bottom, right and left position.
P.S: next time i will not add that number of blocks again because of the number of blocks in the documentation.
This extension have 43 methods and 5 events.
Usage example
Real-time update And multiple thumb support:
https://firebasestorage.googleapis.com/v0/b/myhtmlpage-fafe8.appspot.com/o/20200818-224004-720x1280.mp4?alt=media&token=57538518-e122-40d0-b103-591e658a242f
Test AIA: RealtimeTest (3).aia (22.3 KB)
Test APK: RealtimeTest (4).apk (5.0 MB)
Usage example2:
Move your components:
As you know the extension have some blocks that controls the movement of the components.This usage example describes how to use this blocks.
You can try this apk by touching a component then writing its id and press move,pause,resume.
blocks:
Download links:
RealtimeTest (2).aia (23.7 KB)
RealtimeTest (3).apk (5.0 MB)
Download links
AIX: io.mohamed.ComponentTools.aix (21.9 KB) (20.6 KB) ( V3 )
AIA: i will provide it soon.
Credits
Thanks for any one supported and helped me.I hope you like this extension
Please if you have any suggestions or improvements or Some spelling mistakes please tell me
If you liked, don’t forgot to hit the like button below .
Also another extensions are coming from me soon .
Regards,
Mohamed Tamer