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