Sub Globals
Dim l As Label
Dim a As Animation
End Sub
Sub Activity_Create(FirstTime As Boolean)
l.Initialize("")
Activity.AddView(l, 20, 20, 200, 50)
l.Text = "Hello blinking world!"
setLblColor
a.InitializeAlpha("a", 0, 1)
a.Duration = 200 'adjust your blinking speed
a.RepeatCount = 0
a.Start(l)
End Sub
Sub a_AnimationEnd
setLblColor
a.Start(l) 'any advice if it is fine to start an animation here??
End Sub
Sub setLblColor
l.TextColor = Rnd(Colors.Black, Colors.White)
End Sub
another dirty little trick / suggestion would to use the animation library.. here is the sample... do remember to select your animation library...
B4X:Sub Globals Dim l As Label Dim a As Animation End Sub Sub Activity_Create(FirstTime As Boolean) l.Initialize("") Activity.AddView(l, 20, 20, 200, 50) l.Text = "Hello blinking world!" setLblColor a.InitializeAlpha("a", 0, 1) a.Duration = 200 'adjust your blinking speed a.RepeatCount = 0 a.Start(l) End Sub Sub a_AnimationEnd setLblColor a.Start(l) 'any advice if it is fine to start an animation here?? End Sub Sub setLblColor l.TextColor = Rnd(Colors.Black, Colors.White) End Sub
cheers!
Have you seen this ?I was thinking along the lines of two labels because I was just setting up two labels to create a shadow effect, overlaying labels with the bottom label (with the black or gray "shadow" text) 1-3 pixels to the right and down.