B4A Library MarqueeView

This is a wrap for this github project.


MarqueeView
Author:
DonManfred (wrapper)
Version: 1
  • MarqueeView
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • start As Boolean
    • startWithList (notices As List)
    • startWithText (notice As String)
    Properties:
    • AnimDuration As Int
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Interval As Int
    • Left As Int
    • Notices As List
    • Parent As Object [read only]
    • Tag As Object
    • TextColor As Int
    • TextSize As Int
    • Top As Int
    • Visible As Boolean
    • Width As Int

Development-Time
- Download 17:29
- This thread created 17:53
 

Attachments

  • MarqueeViewEx.zip
    9.4 KB · Views: 505
  • MarqueeViewV1.0.zip
    8.1 KB · Views: 376
  • MarqueeViewV1.01.zip
    8.3 KB · Views: 492
Last edited:

DonManfred

Expert
Licensed User
Longtime User
WHAT? No +10? :( (;))
 

asales

Expert
Licensed User
Longtime User
24 minutes to wrapper and publish? OMG!!:eek:
Did you contact the Guiness Book of Records?
 

Anser

Well-Known Member
Licensed User
Longtime User
Hi Don,

Nice tool and great work.

When I tested, it looks like there is an issue with the TextColor. Whatever color we specify, it displays the text in White color only. The background color can be changed and it is working fine.

I tried to change the Text color from code as well as from Designer too, unfortunately it has no effect.

B4X:
#AdditionalRes: ..\res.MarqueeView

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private Marquee As MarqueeView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
  
  
End Sub

Sub Activity_Resume
    Dim marquees As List
    marquees.Initialize
    marquees.AddAll(Array As String("DonManfred presents","MarqueeView",":-)",""))
    Marquee.startWithList(marquees)
    Marquee.TextColor = Colors.Yellow 'Doesn't have any effect. Tried in Designer too
    Marquee.Color = Colors.Red

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Edit : Another issue noticed is that the content (list) cannot be changed during run time. It doesn't get reflected in the view

Regards
Anser
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Another issue noticed is that the content (list) cannot be changed during run time. It doesn't get reflected in the view
due to the source i would answer:

set the new notices obj.Notices = newlist and then call start

i´ll investigate your other issue later....
 

Anser

Well-Known Member
Licensed User
Longtime User
One thing that I noticed is that

Instead of
B4X:
    Dim marquees As List
    marquees.Initialize
    marquees.AddAll(Array As String("DonManfred presents","MarqueeView",":-)",""))
    Marquee.startWithList(marquees)
    Marquee.TextColor = Colors.Yellow 'Doesn't have any effect. Tried in Designer too
    Marquee.Color = Colors.Red

If I change the code as follows then the color is changed ie the color is assigned before the START
B4X:
    Dim Marquees As List
    Marquees.Initialize
    Marquees.AddAll(Array As String("DonManfred presents","MarqueeView",":-)",""))    
    oMarqueeView.TextColor = Colors.Black
    oMarqueeView.Color = Colors.DarkGray     
    oMarqueeView.Notices = Marquees
    oMarqueeView.start

So the issue is resolved
 

DonManfred

Expert
Licensed User
Longtime User
When I tested, it looks like there is an issue with the TextColor. Whatever color we specify, it displays the text in White color only. The background color can be changed and it is working fine.
V1.0.1 does have some customproperties now. See #1

For the color. you need to set the color first and then add items and use start.
 

Gabino A. de la Gala

Active Member
Licensed User
Longtime User
Hello!!. First of all, thanks for your work.

I'm trying your example with both librarys and I apologised than it works with versión 1.0, but not with version 1.01.

With the new versión, set textcolor using the designer is needed to can run then program whitout error.
 

samikinikar

Member
Licensed User
Longtime User
Can someone please let me know if there is any property to set the direction, I want the marquee from left to right or right to left like a ticker and not the one it is given in the example ?.
 
Top