Android Question Rotate Label - Button - Etc.

MarcoRome

Expert
Licensed User
Longtime User
Hi all, is possibile rotate Label, button , etc. as in this example:

image-ruotaretesto-E4BC_545341AE.jpg


Thank you in advance
Marco
 

MarcoRome

Expert
Licensed User
Longtime User
Thank you very much Klaus.
With AnimationPlus work but when i click the Button "still" in original position.
Look movie:


Thank you :)
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
Thank you thedesolatesoul for your suggestion. Now use the code Klaus. Work perfectly.

B4X:
'Sets the rotation angle around the X axis of the given view
'v = view
'Angle = rotation angle in degrees
Sub setRotationX(v As View, Angle As Float)
    Dim jo = v As JavaObject
    jo.RunMethod("setRotationX", Array As Object(Angle))
End Sub

Sub Activity_Create(FirstTime As Boolean)
.....
' Object, grade
setRotation(Button1, 180)
End Sub

Thank to all ;)
 
Upvote 0

Ivan Aldaz

Member
Licensed User
Longtime User
Hi, I know it's a bit late but think this answer could be useful, for someone looking how to rotate views (as I was now)

The code above works like a charm, but we can take advantage of it a little more. I've seen that there are three methods relative to rotation:

- setRotationX : the view rotates around the horizontal axis, tilting the text backwards (creating the effect of Star Wars texts) or forwards
- setRotationY : the view rotates around the vertical axis, creating perspective
- setRotation : the view rotates around an axis perpendicular to the screen, without changing the dimensions of the view

Hope this helps.

Ivan
 
Upvote 0
Top