Using Reflection to set MARQUEE on Label

thedesolatesoul

Expert
Licensed User
Longtime User
As I understand the Label is an extension of textview which exposes the setEllipsize method which allows text to scroll if it is too long.

The argument to the function is however an enumerated type and I do not know how to pass that through reflection.
TextView | Android Developers)



B4X:
Dim r As Reflector 
r.Target = lbl
r.RunMethod2("setEllipsize","MARQUEE", "java.lang.Object")

I have tried java.lang.Enum as well.
 

Mahares

Expert
Licensed User
Longtime User
@klaus:
In your sample, you try to apply the ellipsize to the listview items. I was under the impression that you cannot apply it to such view. If it does, then it is not showing it in the sample. Could you please straighten me out. I love to see listview items scroll as a marquee.
Merci
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Unfortunately, you can't scroll text in ListView labels.
I had written the example code quite some time ago and updated it with socialnetis's suggestion.
I also tested in this example setting MARQUEE in ListView labels with no success.

Best regards.
 
Upvote 0
Top