Android Question MarqueeText - Turn Off

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I use the below code to Turn on Marquee Text

B4X:
Public Sub MarqueeText(DisplayField As Object, LimitTo As Int)
    Dim Ref As Reflector

    Ref.Target = DisplayField

    Ref.RunMethod2("setLines", 1, "java.lang.int")
    Ref.RunMethod2("setHorizontallyScrolling", True, "java.lang.boolean")

    Ref.RunMethod2("setEllipsize", "MARQUEE", "android.text.TextUtils$TruncateAt")
    Ref.RunMethod2("setSelected", True, "java.lang.boolean")

    If LimitTo == 0 Then
       LimitTo = -1
    End If

    Ref.RunMethod2("setMarqueeRepeatLimit", LimitTo, "java.lang.int")
End Sub

If the User resizes the field (where MarqueeText is no longer needed) how do I turn off MarqueeText

OR on the other side if the field is large enough to not need MarqueeText and the field is resized smaller and it needs MarqueeText

I do not seem to be able to flip it on and off once the field has text in it.

Any ideas how to reset it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…