[F/OS] 🛠️ ComponentUtil - Additional Tools For Visible Components (90+ blocks)

Thank you. I'll finalize the new version tomorrow.

EDIT: Editing it now...

:chocolate_bar: Version 5

  • New blocks:

SetRipple

image

Applies ripple effect for the given component.

Parameters: component = component, color = color

SetScaleX

image

Sets the amount that the component is scaled in x around the pivot point, as a proportion of the component's unscaled width. A value of 1 means that no scaling is applied.

Parameters: component = component, scaleX = number (float)

SetScaleY

image

Sets the amount that the component is scaled in y around the pivot point, as a proportion of the component's unscaled height. A value of 1 means that no scaling is applied.

Parameters: component = component, scaleY = number (float)

SetScrollbarFadingEnabled

image

Define whether scrollbars will fade when the component is not scrolling.

Parameters: component = component, fade = boolean

WillNotDraw

image

Checks whether the component can draw on its own.

Returns: boolean

Parameters: component = component

3 Likes

Thank you so much for SetRipple block :slight_smile:

You are welcome. :wink:

2 Likes

Thank you @Gordon_Lu , this is very helpful.

1 Like

:chocolate_bar: Version 6!

New blocks:

IsDirty

image

True if this component has changed since the last time being drawn.

Returns: boolean

Parameters: component = component

IsHovered

image

Returns true if the view is currently hovered. This only works on real Android devices that have a mouse and a cursor.

Returns: boolean

Parameters: component = component

OvershootHorizontal

image

Start a horizontal overshoot animation. If 'tension' is set to 0 you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in milliseconds. Use as example for 1 second '1000'.

Parameters: component = component, startPosition = number (float), endPosition = number (float), duration = number (int), tension = number (float)

OvershootVertical

image

Start a vertical overshoot animation. If 'tension' is set to 0 you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in milliseconds. Use as example for 1 second '1000'.

Parameters: component = component, startPosition = number (float), endPosition = number (float), duration = number (int), tension = number (float)

Zoom

image

Start a zoom animation. Set 'tension' 0 if you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in milliseconds. Use as example for 1 second '1000'.

Parameters: component = component, startPosition = number (float), endPosition = number (float), duration = number (int)-

Taken some reference from OvershootInterpolator  |  Android Developers

Hover features require all of these requirements. If even one of them is not fulfilled, this will not work.

  • the device must have a mouse and a cursor that can be used to click, hover or scroll.

  • the device must be a real device, e.g. Android computers. Emulators are not accepted.

  • the device must not be an only touch-screen device, such as smartphones.

Given the fact that only 2% of Android devices fulfill these requirements, please consider whether you should use it.

2 Likes

Sorry for the delay. I haven't been very active in the community (and I didn't update the extension) these days because I have competitions to attend. Here is version 6.

com.gordonlu.componentutil.aix (31.1 KB)

2 Likes

Please add Full Clickable function.

Why? Aren't "Click" and "LongClick" enough?

No i want Full Clickable.

I mean why do you need it.

1 Like

I created card view, inside have multiple slider and button and text.
I need to disable all chaild component and work only parent card view click function.

My English is not clear.:pensive::pensive:

1 Like

Working on it, quite busy these days.

BUG,

if long click, when executed click and longclick together

2022-07-25_12-48-02

1 Like

A post was merged into an existing topic: Help please about my facemesh program

Can this be used for appathon?

It looks cool

Yes, you are allowed to use this extension for the MIT App Inventor Appathon for 2023.

Thanks @Gordon_Lu