Android Question ScrollingLabels Scroll Speed

mmieher

Active Member
Licensed User
Longtime User
I have been struggling with ScrollingLabels ...

I turn them on and off during the program execution. I turn them on by calling the sub below. scrollSpeed is an int and is set to 1.
Each time I call AnimateGreeting, the scrolling speed increases. I am not changing the value of scrollSpeed.

Any ideas?
Marc

B4X:
Sub AnimateGreeting
  
    '    Build ScrollText from Work Orders ----------------------------------------------------
    SQLText = "SELECT * FROM wolist ORDER BY wrkordnbr DESC "
    wList = DBUtils.ExecuteMemoryTable(SQL1,SQLText,Null,0)
      
    If wlist.size = 0 Then Return
  
    ScrollText = ""
    Dim cs As CSBuilder
    cs.Initialize
  
    For i = 0 To wList.Size - 1
        wRecord = wList.Get(i)
        wMap = MapWORecord(wRecord)
        ScrollText = cs.Color(Colors.Gray).Append("      " & wMap.Get("wrkordnbr") & " ")
        If s.Val(wMap.Get("priority")) = "0" Then
            ScrollText = cs.Color(Colors.Red).Append("URGENT ")    '    does not change color to red?
        End If
        ScrollText = cs.Append(wMap.Get("servsitename"))
    Next
    ScrollText = cs.Append("").PopAll
  
    '    Start Scrolling ----------------------------------------------------------------------
  
    ScrollingLabels.Initialize
  
    slGreeting.Initialize("slGreeting")
    slGreeting.TextColor = Colors.Gray
    slGreeting.TextSize = 20
  
    Activity.AddView(slGreeting,20dip,45dip,570dip,50dip)
  
    ScrollingLabels.StartScrolling(slGreeting,ScrollText,True,scrollSpeed,Null,Colors.RGB(248,248,255))
  
End Sub
 

mmieher

Active Member
Licensed User
Longtime User
Here is a stripped down version of a large project. Thanks for looking into this.

Marc
 

Attachments

  • ScrollTest.zip
    20.7 KB · Views: 224
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…