vecino Well-Known Member Licensed User Longtime User Apr 21, 2013 #1 Hi, one question: is it possible to display a "label" vertically? Thanks and regards. Example: Attachments vertical.png 1.5 KB · Views: 611
NJDude Expert Licensed User Longtime User Apr 22, 2013 #2 Take a look at CANVAS and DrawTextRotated Upvote 0
stevel05 Expert Licensed User Longtime User Apr 22, 2013 #3 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
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.
vecino Well-Known Member Licensed User Longtime User Apr 22, 2013 #4 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 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
stevel05 Expert Licensed User Longtime User Apr 22, 2013 #5 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 rt.zip rt.zip 6.9 KB · Views: 463 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.
vecino Well-Known Member Licensed User Longtime User Apr 22, 2013 #6 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
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.
stevel05 Expert Licensed User Longtime User Apr 22, 2013 #7 Yes, it will only work on API 11, honeycomb or later. Upvote 0
vecino Well-Known Member Licensed User Longtime User Apr 22, 2013 #8 Thanks for the info Greetings. Upvote 0
IanMc Well-Known Member Licensed User Longtime User Jul 5, 2014 #9 yah, I'm getting the java.lang.NoSuchMethodException: setRotation on your demo. Is it because of my Android version 2.3.7 ? Upvote 0
yah, I'm getting the java.lang.NoSuchMethodException: setRotation on your demo. Is it because of my Android version 2.3.7 ?
stevel05 Expert Licensed User Longtime User Jul 5, 2014 #11 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: Jul 5, 2014 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.
IanMc Well-Known Member Licensed User Longtime User Jul 5, 2014 #12 Hey thanks steve and I'll also have a look at the Canvas as suggested by NJ. Thanks! Upvote 0