Styles Extension for MIT App Inventor: A Deep Dive into UI Customization

none
.. theres 2 version i saw this started when i deleted version 1 to place version2 then that happened

@Black_Knight
add this:

@SimpleFunction(description = "Apply rotation to a view. Value ranges from 0 to 360 degrees.")
public void ApplyRotate(AndroidViewComponent view, int value) {
    View targetView = view.getView();
    
    // Clamp the rotation value between 0 and 360 for safety
    float rotation = Math.max(0, Math.min(360, value));

    // Set pivot point to the center of the view
    targetView.setPivotX(targetView.getWidth() / 2f);
    targetView.setPivotY(targetView.getHeight() / 2f);

    // Apply rotation
    targetView.setRotation(rotation);
}

This fuction apply rotation to the components?

1 Like

Yeah, it is

1 Like

Nice one , I will add it in the next update ,
Thanks @mahmoud_hooda

1 Like

Is there a way to have multiple "viewComponent" in the "call styles .SetCornerRadius"? Trying to keep from having a call block for every component that has the same radius.

when using this extension , app build error saying d8 error. i m using other extension recyclerlist, does it conflicts the library? if yes, then how to compile without error

1 Like

I am using material dialogs liberary but I don't know how this may cause a conflict,
I will check it again

2 posts were split to a new topic: Error d8 while building