Show "label" vertical

vecino

Well-Known Member
Licensed User
Longtime User
Hi, one question: is it possible to display a "label" vertically?
Thanks and regards.

Example:
 

Attachments

  • vertical.png
    vertical.png
    1.5 KB · Views: 611
Or you can use the reflection library on the view:

Code: Copy
Dim R As Reflector
   R.Target=Label1
   R.RunMethod2("setRotation","270","java.lang.float")

You won't be able to see the results in the designer.
 
Upvote 0
Hi, thanks for the answers, but I could not make it work.
In the first case comes directly the error: "java.lang.NullPointerException"
And in the second case: "java.lang.NoSuchMethodException: setRotation"
I may not have done well because I'm fairly novice, can you give me an example?
Many thanks and greetings
:o
 
Upvote 0
The example given should work if you have a label already visible in a layout.

So it needs to be added either with the designer or in code as normal.

The attached example shows the rotation with two labels.

If you can't get it working in your project, it would be useful if you can post your code.
 

Attachments

Upvote 0
Thank you very much, it works perfectly.
The problem is that it works in the "Emulator", but it does on the tablet.
Thanks and regards.
:)
 
Upvote 0
yah, I'm getting the java.lang.NoSuchMethodException: setRotation

on your demo.

Is it because of my Android version 2.3.7 ?
 
Upvote 0
You could try using the animation library with a short duration, see the thread for discussion on how to get the animation to stay at the end.
 
Last edited:
Upvote 0
Hey thanks steve and I'll also have a look at the Canvas as suggested by NJ.

Thanks!
 
Upvote 0
Back
Top