Stuart Little
Member
Hi,
I downloaded the trial version today and really enjoying the experience. I am particularly interested in understanding how the animation works with this software.
I referred to this link https://www.b4x.com/android/forum/threads/android-views-animation-tutorial.6967/
My scenario is this.
All I want is a button which when clicked would slowly show some text and which should fade away after sometime. Hopefully in future when I click on a cat, it would say meow meow and that fades away.
The link above only provides detail on moving from (0 to 1) or (1 to 0) but not (0 to 1 to 0) or (1 to 0 to 1)
I tried the following way but it doesn't seem to work.
Please let me know your thoughts!
Thank you.
I downloaded the trial version today and really enjoying the experience. I am particularly interested in understanding how the animation works with this software.
I referred to this link https://www.b4x.com/android/forum/threads/android-views-animation-tutorial.6967/
My scenario is this.
All I want is a button which when clicked would slowly show some text and which should fade away after sometime. Hopefully in future when I click on a cat, it would say meow meow and that fades away.
The link above only provides detail on moving from (0 to 1) or (1 to 0) but not (0 to 1 to 0) or (1 to 0 to 1)
I tried the following way but it doesn't seem to work.
B4X:
Sub Button_Click
Dim b As Button
b = Sender
b.Text = "Meow Meow"
'Safety check. Not really required in this case.
If Not(b.Tag Is Animation) Then Return
Dim a As Animation
a.InitializeAlpha("", 1, 0)
a.Duration = 1000
a = b.Tag
a.Start(b)
'Do I again have to initialize alpha?
a.InitializeAlpha("",0, 1)
a.Duration = 1000
a = b.Tag
a.Start(b)
End Sub
Please let me know your thoughts!
Thank you.