B4A Library Scrolling Labels, bi directional with multi line support (News Feeds)

Hi

This is a library which displays scrolling text on the screen like news style on TV channel
Features


  • Custom Separator Images support
  • Multiple lines support on the same object
  • Bi- Directional Right-Left Left-Right
  • Arabic Language support
  • Transparent and Colorful background support
  • Source code included
  • Scrolling Speed Adjustable
  • Simple to use

To use the library Just add it to your library folder
Refresh the libs, and select


Example Code

B4X:
Sub Globals
    Dim Label1 As Label
    Dim ImageView1 As ImageView
    Dim ph As Phone
    Dim ScrollingLabels As ScrollingText
End Sub


Sub Activity_Create(FirstTime As Boolean)
    'ph.SetScreenOrientation(1)   
    ScrollingLabels.Initialize
    'Dim splitter As Bitmap
    ImageView1.Initialize("ImageView1")
    ImageView1.Bitmap=LoadBitmap(File.DirAssets,"aa-clock.png")
   

    Label1.Initialize("") 'Not needed if the label is added with the designer
    Label1.TextColor=Colors.Red
    Label1.Tag = "1"
    Activity.AddView(Label1, 10dip, 10dip, 100%x, 30dip)
   
    ScrollingLabels.StartScrolling(Label1, "This is a very Long text" & CRLF & "This is the second message", True ,10,LoadBitmap( File.DirAssets,"aa-clock.png"),Colors.Green)

    Label1.Initialize("") 'Not needed if the label is added with the designer
    Label1.TextColor=Colors.Cyan
    Label1.Tag = "2"
 
    Activity.AddView(Label1, 10dip, 60dip, 100%x, 20dip)
    Label1.Width=720dip
       ScrollingLabels.StartScrolling(Label1, "هذا النص مكتوب باللغة العربية" & CRLF & "هذه هي الرسالة الثانية", False ,3,LoadBitmap( File.DirAssets,"aa-clock.png"),Colors.White)




End Sub
 

Attachments

  • Scrolling Text Library.zip
    6.4 KB · Views: 303
  • Scrolling Text Source.zip
    14.4 KB · Views: 294
Top